rstoolbox.plot.
plot_in_context
(df, fig, grid, refdata, igrid=None, values='*', ref_equivalences=None, legends=False, **kwargs)¶Plot position of decoys in a backgroud reference dataset.
Note
Personalization is possible by providing argument keys for kdeplot()
with the prefix kde_
and for plot()
(for the points) with the
prefix point_
.
Parameters: |
|
||||||
---|---|---|---|---|---|---|---|
Returns: |
|
||||||
Raises: |
|
Example:
In [1]: from rstoolbox.plot import plot_in_context
...: from rstoolbox.utils import load_refdata
...: import matplotlib.pyplot as plt
...: df = load_refdata('scop2')
...: slength = 100
...: refdf = load_refdata('scop2', 50)
...: refdf = refdf[(refdf['length'] >= slength - 5) &
...: (refdf['length'] <= slength + 5)]
...: values = ["score", "hbond_sr_bb", "avdegree", "hbond_bb_sc",
...: "cavity", "CYDentropy", "pack", "radius"]
...: fig = plt.figure(figsize=(25, 10))
...: axs = plot_in_context(df, fig, (2, 4), refdata=refdf, values=values)
...: plt.tight_layout()
...:
In [2]: plt.show()
In [3]: plt.close()