MatPlotTheme

matplottheme is the starting point of MatPlotTheme library. It wraps the instances of Style and Palette, and provides plotting interfaces to the users.

matplottheme.bar(ax, *args, **kwargs)[source]

Add a bar plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the bar method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped bar method.

Parameters:ax – The input axes object.
Returns:matplotlib.patches.Rectangle instances.

All additional input parameters are passed to the wrapped bar method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.bar().

matplottheme.barh(ax, *args, **kwargs)[source]

Add a horizontal bar plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the barh method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped barh method.

Parameters:ax – The input axes object.
Returns:matplotlib.patches.Rectangle instances.

All additional input parameters are passed to the wrapped barh method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.barh().

matplottheme.boxplot(ax, *args, **kwargs)[source]

Add a box plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the boxplot method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped boxplot method.

Parameters:ax – The input axes object.
Returns:A dictionary. See boxplot().

All additional input parameters are passed to the wrapped boxplot method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.boxplot().

matplottheme.cohere(ax, *args, **kwargs)[source]

Add a coherence plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the cohere method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped cohere method.

Parameters:ax – The input axes object.
Returns:A tuple (Cxy, f), where f are the frequencies of the coherence vector.

All additional input parameters are passed to the wrapped cohere method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.cohere().

matplottheme.csd(ax, *args, **kwargs)[source]

Add a cross-spectral density plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the csd method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped csd method.

Parameters:ax – The input axes object.
Returns:A tuple (Pxy, freqs). P is the cross spectrum (complex valued).

All additional input parameters are passed to the wrapped csd method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.csd().

matplottheme.errorbar(ax, *args, **kwargs)[source]

Add an errorbar plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the errorbar method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped errorbar method.

Parameters:ax – The input axes object.
Returns:A tuple (plotline, caplines, barlinecols).

All additional input parameters are passed to the wrapped errorbar method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.errorbar().

matplottheme.fill_between(ax, *args, **kwargs)[source]

Add filled polygons to matplotlib.axes.Axes object.

This method is a wrapper of the fill_between method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped fill_between method.

Parameters:ax – The input axes object.

All additional input parameters are passed to the wrapped fill_between method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.fill_between().

matplottheme.fill_betweenx(ax, *args, **kwargs)[source]

Add filled polygons to matplotlib.axes.Axes object.

This method is a wrapper of the fill_betweenx method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped fill_betweenx method.

Parameters:ax – The input axes object.

All additional input parameters are passed to the wrapped fill_betweenx method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.fill_betweenx().

matplottheme.hist(ax, *args, **kwargs)[source]

Add a histogram plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the hist method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped histogram method.

Parameters:ax – The input axes object.
Returns:(n, bins, patches) or ([n0, n1, ...], bins, [patches0, patches1,...])

All additional input parameters are passed to the wrapped hist method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.hist().

matplottheme.legend(ax, *args, **kwargs)[source]

Place a legend to the input matplotlib.axes.Axes object.

This method is a wrapper of the legend method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped legend method.

Parameters:ax – The input axes object.
Returns:The legend

All additional input parameters are passed to the wrapped legend method.

Note

Different style may introduce different input parameters besides those from matplotlib.legend.Legend.

matplottheme.pcolormesh(ax, *args, **kwargs)[source]

Add a quadrilateral mesh to matplotlib.axes.Axes object.

This method is a wrapper of the pcolormesh method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped pcolormesh method.

Parameters:ax – The input axes object.

All additional input parameters are passed to the wrapped pcolormesh method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.pcolormesh().

matplottheme.plot(ax, *args, **kwargs)[source]

Add a line plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the plot method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped plot method.

Parameters:ax – The input axes object.
Returns:A list of lines that were added.

All additional input parameters are passed to the wrapped plot method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.plot().

matplottheme.psd(ax, *args, **kwargs)[source]

Add a power spectral density plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the psd method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped psd method.

Parameters:ax – The input axes object.
Returns:A tuple (Pxx, freqs).

All additional input parameters are passed to the wrapped psd method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.psd().

matplottheme.scatter(ax, *args, **kwargs)[source]

Add a scatter plot to the input matplotlib.axes.Axes object.

This method is a wrapper of the scatter method in the Style object which is used for stylization. All parameters are directly handed over to the wrapped scatter method.

Parameters:ax – The input axes object.
Returns:matplotlib.collections.PathCollection objects.

All additional input parameters are passed to the wrapped scatter method.

Note

Different style may introduce different input parameters besides those from matplotlib.axes.Axes.scatter().

matplottheme.set_theme(style_name=None, palette_name=None)[source]

Set the global Style and Palette.

This method sets the input Style and Palette as default customization options. All plotting methods in matplottheme employ these options.

Parameters:
  • palette_name – The name of a Palette. Input value can be None, 'default', or 'ggplot2'.
  • style_name – The name of a Style. Input value can be None, 'default', or 'ggplot2'.