plot
add_cbar(ax, cmap, norm, **kwargs)
Truncate or expand cmap such that it covers axes limit and and colorbar to axes
Source code in pyhdx/plot.py
1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 |
|
add_mse_panels(axes, fit_result, cmap=None, norm=None, panel_kwargs=None, fig=None, cbar=False, cbar_kwargs=None)
adds linear bar panels to axes showing some property (usually MSE)
Source code in pyhdx/plot.py
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 |
|
linear_bars(data, norm, cmap, cbar_sclf=1.0, **figure_kwargs)
Generate a linear bar plot with multiple subplots.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
dict[str, dict[str, Series]]
|
A dictionary containing the data for each subplot. The keys are the top-level labels, and the values are dictionaries containing the data for each subplot. The data is represented as a pandas Series object. |
required |
norm
|
A normalization object to be applied to the color scale. |
required | |
cmap
|
A colormap object to be used for coloring the bars. |
required | |
cbar_sclf
|
A scaling factor to be applied to the color scale. Default is 1.0. |
1.0
|
|
**figure_kwargs
|
Additional keyword arguments to be passed to the figure. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
fig |
The figure object containing the plot. |
|
axes |
The axes object containing the subplots. |
|
cbar |
The colorbar object. |
Source code in pyhdx/plot.py
660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 |
|
linear_bars_figure(data, reference=None, groupby=None, field='dG', norm=None, cmap=None, **figure_kwargs)
Generate a linear bars figure based on the provided data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
DataFrame
|
A pandas DataFrame containing the data to be plotted. |
required |
reference
|
Optional[str]
|
An optional string representing the reference value for subtraction. |
None
|
groupby
|
Optional[str]
|
An optional string representing the column to group the data by. |
None
|
field
|
str
|
A string representing the field to be plotted. Default is "dG". |
'dG'
|
norm
|
An optional normalization function. |
None
|
|
cmap
|
An optional colormap. |
None
|
|
**figure_kwargs
|
Additional keyword arguments to be passed to the figure. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
fig |
The generated figure. |
|
axes |
The axes of the figure. |
|
cbar |
The colorbar of the figure. |
Source code in pyhdx/plot.py
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 |
|
residue_time_scatter_figure(hdxm, field='rfu', cmap='turbo', norm=None, scatter_kwargs=None, cbar_kwargs=None, **figure_kwargs)
per-residue per-exposure values for field field
by weighted averaging
Source code in pyhdx/plot.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
|
single_linear_bar(ax, x, z, cmap, norm, **kwargs)
makes a linear bar plot on supplied axis with values z and corresponding x values x
Source code in pyhdx/plot.py
1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 |
|