quantile_plot¶
-
hhpy.plotting.
quantile_plot
(x: Union[Sequence[T_co], str], data: pandas.core.frame.DataFrame = None, qs: Union[Sequence[T_co], float] = None, x2: str = None, hue: str = None, hue_order: Union[Sequence[T_co], str] = None, to_abs: bool = False, ax: matplotlib.axes._axes.Axes = None, **kwargs) → matplotlib.axes._axes.Axes[source]¶ plots the specified quantiles of a Series using seaborn.barplot
Parameters: - x – Name of the x variable in data or vector data
- data – Pandas DataFrame containing named data, optional if vector data is used
- qs – Quantile levels [optional]
- x2 – if specified: subtracts x2 from x before calculating quantiles [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
- to_abs – Whether to cast the values to absolute before proceeding [optional]
- ax – The matplotlib.pyplot.Axes object to plot on, defaults to current axis [optional]
- kwargs – other keyword arguments passed to seaborn.barplot
Returns: The matplotlib.pyplot.Axes object with the plot on it