coplot.plots

class coplot.plots.MultiplePanels(panel_model, lat_n=3)[source]

Bases: object

Plot a figure with multiple panels.

Parameters:panel_model (object) – An instance that can provide datasets and panel model (it should contain two methods: ‘panels_data’ and ‘panel’).
lat_n

The number of panels in latitude (or transverse) direction.

lon_n

The number of panels in longitude (or longitudinal) direction.

plot(panel_size=(4, 3), layout_adjust=[0.3, 0.25], ticks_size=12)[source]
class coplot.plots.Plots(set_figsize=True)[source]
plot_dots()[source]
plot_errbars()[source]
plot_fillBetween()[source]
plot_hist()[source]
plot_lines()[source]
siglePlot(location=None, lims=None, labels=None, ticks_size=None, major_locator_N=None, minor_locator=True, minor_locator_N=None, lines=None, line_labels=None, line_styles=None, line_colors=None, line_width=None, dots=None, dot_labels=None, dot_styles=None, dot_colors=None, errbars=None, errbar_line_width=None, errbar_colors=None, xerr=True, yerr=True, errbars_fmt=None, errbar_labels=None, fill_between=None, fill_between_line_width=None, fill_between_line_styles=None, fill_between_colors=None, fill_between_labels=None, fill_between_alphas=None, hist=None, hist_bins=None, hist_colors=None, hist_alpha=None, hist_labels=None, legend=False, legend_location=None, title=None, title_size=None)[source]

Plot dots, lines, error bars, fill between, histogram, etc.

Parameters:
  • location (tuple or list, optional) – The location of the panel, location=(1,2,2) or [1,2,2].
  • lims (list, optional) – The limits of X and Y axis: [min_x, max_x, min_y, max_y].
  • labels (list, optional) – The labels of the panel. e.g. [r’$x$’,r’$y$’]
  • ticks_size (int, optional) – The font size of ticks.
  • major_locator_N (int, optional) – The number of major locators.
  • minor_locator (bool, optional) – If True(False), show(don’t show) the minor locators.
  • minor_locator_N (int, optional) – The number of minor locators.
Returns:

fig or ax

Return type:

object

coplot.plots.get_fiducial_colors(num)[source]
coplot.plots.get_fiducial_line_styles(num)[source]
coplot.plots.makeList(roots)[source]

Checks if the given parameter is a list, if not, creates a list with the parameter as an item in it.

Parameters:roots (object) – The parameter to be checked.
Returns:A list containing the parameter.
Return type:list
coplot.plots.makeListList(roots)[source]

Checks if the element of the given parameter is a list, if not, creates a list with the parameter as an item in it.

Parameters:roots (object) – The parameter to be checked.
Returns:A list containing the parameter.
Return type:list
coplot.plots.savefig(path, fig_name, fig, dpi='figure')[source]
dpi: float or ‘figure’. The resolution in dots per inch.
If ‘figure’, use the figure’s dpi value.