tmcclintock / BetterViolinPlots

Better violin plots for common scenarios.
MIT License
1 stars 1 forks source link

Wrap matplotlib.pyplot.boxplot #4

Open tmcclintock opened 4 years ago

tmcclintock commented 4 years ago

Adding a wrapper around matplotlib.pyplot.boxplot should be straightforward and add another option on to what can be plotted with this package. An example spec would be:

def boxplot(
    points: Union[List, np.ndarray],
    positions: Optional[List[int]] = None,
    axis: Optional["mpl.axes.Axes"] = None,
    vertical_violins: bool = True,
    boxplot_kwargs: Union[Dict[str, Any], List[Dict[str, Any]]] = {},
    plot_kwargs: Optional[Union[Dict[str, Any], List[Dict[str, Any]]]] = {
        "color": "black",
    },
) -> Tuple[mpl.figure.Figure, mpl.axes.Axes]:
    ...
    ax.boxplot(points, positions=positions, **boxplot_kwargs, **plot_kwargs, vert=vertical_violins)
    return fig, ax
tmcclintock commented 4 years ago

The boxplot has been implemented, but it still needs an example in the notebook gallery.