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
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 1331 |
|
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
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 1085 |
|
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
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 733 |
|
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
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 658 |
|
plot_fitresults(fitresult_path, reference=None, plots='all', renew=False, cmap_and_norm=None, output_path=None, output_type='.png', **save_kwargs)
Parameters
fitresult_path
plots
renew
cmap_and_norm: :obj:dict
, optional
Dictionary with cmap and norms to use. If None
, reverts to defaults.
Dict format: {'dG': (cmap, norm), 'ddG': (cmap, norm)}
output_type: list or str
Returns
Source code in pyhdx/plot.py
1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 |
|
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
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 246 |
|
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
1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 |
|