rmsdplot¶
-
hhpy.plotting.
rmsdplot
(x: str, data: pandas.core.frame.DataFrame, groups: Union[Sequence[T_co], str] = None, hue: str = None, hue_order: Union[Sequence[T_co], str] = None, cutoff: float = 0, ax: matplotlib.axes._axes.Axes = None, color_as_balance: bool = False, balance_cutoff: float = None, rmsd_as_alpha: bool = False, sort_by_hue: bool = False, palette=None, barh_kws=None, **kwargs)[source]¶ creates a seaborn.barplot showing the rmsd calculating
df_rmsd()
Parameters: - x – Name of the x variable in data or vector data
- data – Pandas DataFrame containing named data, optional if vector data is used
- groups – the columns to calculate the rmsd for, defaults to all columns [optional]
- hue – Further split the plot by the levels of this variable [optional]
- hue_order –
Either a string describing how the (hue) levels or to be ordered or an explicit list of levels to be used for plotting. Accepted strings are:
sorted
: following python standard sorting conventions (alphabetical for string, ascending for value)inv
: following python standard sorting conventions but in inverse ordercount
: sorted by value countsmean
,mean_ascending
,mean_descending
: sorted by mean value, defaults to descendingmedian
,mean_ascending
,median_descending
: sorted by median value, defaults to descending
- cutoff – drop rmsd values smaller than cutoff [optional]
- ax – The matplotlib.pyplot.Axes object to plot on, defaults to current axis [optional]
- color_as_balance – Whether to color the bars based on how balanced (based on maxperc values) the levels are [optional]
- balance_cutoff – If specified: all bars with worse balance (based on maxperc values) than cutoff are shown in red [optional]
- rmsd_as_alpha – Whether to use set the alpha values of the columns based on the rmsd value [optional]
- sort_by_hue – Whether to sort the plot by hue value [optional]
- palette – Collection of colors to be used for plotting. Can be a dictionary for with names for each level or a list of colors or an individual color name. Must be valid colors known to pyplot [optional]
- barh_kws – other keyword arguments passed to seaborn.barplot [optional]
- kwargs – other keyword arguments passed to
hhpy.ds.rf_rmsd()
[optional]
Returns: The matplotlib.pyplot.Axes object with the plot on it
Examples
Check out the example notebook