class jade.basic.plotting.MakeFigure.MakeFigure(rows=1, columns=1, share_x=True, share_y=True)[source]

Deprecated. NOW - GO Checkout SEABORN instead of this class! Essentially, this is an interface to a facet grid. Seaborn does this awesomely.

My take on a plotting interface. Because I think matplotlib’s interface sucks.

I wrote this before I knew of pandas.

You need to know the number of plots ahead of time by passing the grid.

1x1 will make one plot. 2x2 will make a grid of 4 plots. 1x3 is 3 columns of grids horizontally 3x1 is a list of figures.

share_x and share_y tell the full sublplot to share the axis.

add_data(x, y, label)[source]
add_grid(x_grid=True, y_grid=True)[source]
fill_subplot(title, labels, x_axis_label=None, y_axis_label=None, index=None, grid=None, add_legend=False, linestyle='--', marker='^', colors=None)[source]

This will add data to a particular subplot/plot.

: title: : labels: : x_axis_label: : y_axis_label: : specify_index: : add_legend: : linestyle: : marker: : colors: :return:

get_data(label)[source]
get_labels()[source]
get_plot(n=0)[source]
Parameters:n – int
Returns:mpl.axes.SubplotBase
get_x_data(label)[source]
get_y_as_list(labels)[source]
get_y_data(label)[source]
merge_data(data_dict, replace_current_labels=False)[source]
reset(rows=1, columns=1, share_x=True, share_y=True)[source]
save_plot(outpath, tight=True)[source]
set_data(data_dict)[source]
set_x_limits(min, max, plot_num=None)[source]
set_x_scale(scale='log', plot_num=None)[source]
set_y_limits(min, max, plot_num=None)[source]
set_y_scale(scale='log', plot_num=None)[source]
jade.basic.plotting.MakeFigure.pad_single_title(ax, x=0.5, y=1.05)[source]

Move the Title up in reference to the plot, essentially adding padding. SINGLE AXES :param ax:Axes :param x: :param y: :return:

jade.basic.plotting.MakeFigure.plot_general_pandas(df, title, outpath, plot_type, x, y=None, z=None, top_p=0.95, reverse=True)[source]

Plot anything in pandas. Make it look descent. Save the figure.

If you are doing this multiple times in a Notebook:
Don’t forget to call (matplotlib.pyplot)
plot.show() plot.close()
Parameters:
  • df – pandas.DataFrame
  • title – str
  • outpath – str
  • plot_type – str
  • x – str
  • y – str
  • z – str
  • top_p – float
  • reverse – bool
Return type:

matplotlib.Axes

jade.basic.plotting.MakeFigure.plot_x_vs_y_sea_with_regression(df, title, outpath, x, y, top_p=0.95, reverse=True)[source]

Plot X vs Y using a Pandas Dataframe and Seaborn, with regression line., save the figure, and return the Axes.

If you are doing this multiple times in a Notebook:
Don’t forget to call (matplotlib.pyplot)
plot.show() plot.close()
Parameters:
  • df – pandas.DataFrame
  • title – str
  • outpath – str
  • x – str
  • y – str
  • top_p – float
  • reverse – bool
Return type:

matplotlib.Axes

jade.basic.plotting.MakeFigure.set_common_title(fig, title, size=16, x=0, y=1.05)[source]

for FACETED plots, add a common title.

Parameters:
  • fig – Figure
  • title – str
  • x – int
  • y – int
Returns:

jade.basic.plotting.MakeFigure.set_common_x_y_label(fig, x_text, y_text)[source]

For FACETED plots, add a common X or Y.

Parameters:
  • fig – Figure
  • x_text – str
  • y_text – str
Returns: