jmpy.plotting package¶
Submodules¶
jmpy.plotting.boxplot module¶
-
jmpy.plotting.boxplot.
boxplot
(x, y, data=None, legend=None, marker='o', alpha=0.5, points=True, cumprob=False, yscale='linear', cmap='default', figsize=(12, 6), orderby=None, table=True, fig=None, axes=None, cgrid=None, violin=False, **kwargs)[source]¶ Boxplot function :param x: str or ndarray :param y: str or ndarray :param data: pd.Dataframe, source of data :param legend: str or ndarray color code by this column :param marker: str, default marker to use in plots :param alpha: float, alpha for plots :param points: bool, display or not display points :param cumprob: bool, display cumprob plot? :param yscale: str, default = linear, can be log or symlog too :param cmap: str, matplotlib colormap :param figsize: tuple(int,int), figure size :param orderby: str, order x axis by this param :param datatable: bool, show or not show datatable is available :param fig: matplotlib figure, if you want to re-use the figure, pass in one already created :param axes: matplotlib axes, if this is specified, the boxplot will be created on that axes,
and other axes will not be created.Parameters: kwargs – Returns: matplotlib figure
jmpy.plotting.components module¶
-
jmpy.plotting.components.
create_axes
(cumprob, legend, dt, fig)[source]¶ Private method to create all the axes
-
jmpy.plotting.components.
create_df
(x, y=None, z=None, legend=None, rows=None, cols=None)[source]¶ create a generic dataframe from supplied numpy arrays
-
jmpy.plotting.components.
cumprob
(x, ax, color=None, marker='.', alpha=1, swapxy=False)[source]¶ Create a cumprob plot on a provided axes
-
jmpy.plotting.components.
datatable
(x, data, ax, by=None, probs=None)[source]¶ Create a datatable on a provided axes
-
jmpy.plotting.components.
get_axes
(fig, clear=True)[source]¶ Private method to get all the axes from a figure, but put in the correct order
jmpy.plotting.contour module¶
-
jmpy.plotting.contour.
contour
(x, y, z, data=None, marker=None, alpha=0.5, xscale='linear', yscale='linear', cmap=None, ncontours=100, gridsize=100, colorbar=True, labels=False, figsize=(12, 6), filled=True, fig=None, axes=None, cgrid=None, axislabels=True, axisticks=True, **kwargs)[source]¶ Create a contour plot from x, y, ans z values
jmpy.plotting.cumprob module¶
-
jmpy.plotting.cumprob.
cumprob
(x, data=None, legend=None, figsize=(12, 6), xscale='linear', yscale='linear', cmap='default', alpha=0.5, marker='.', table=True, fig=None, axes=None, cgrid=None, **kwargs)[source]¶ Parameters: - x – str or ndarray
- data – is x is a str, this is a pd.Dataframe
- legend – str or ndarray,
- figsize – default is 9,6; sets the figure size
- xscale – default is linear, set the scale type [linear, log, symlog]
- yscale – default is linear, set the scale type [linear, log, symlog]
- cmap – colormap to use for plotting
- alpha – default is 0.5
- marker – set matplotlib marker
- table – bool, default is True, prints the datatable summary to the graph
- kwargs – passed to matplotlib hist function
- fig – matplotlib figure if you want to reuse the figure.
Returns: matplotlib figure
jmpy.plotting.grid module¶
-
jmpy.plotting.grid.
grid
(rows=None, cols=None, data=None, chart=None, args=None, figsize=(8, 8), legend=None, cmap='default', colorbar=False)[source]¶ Create a grid from pandas data
Parameters: - grid – dictionary of x and y columns
- data – pandas dataframe or none
- funct – jumpy plotting fuction, specified as a lambda with data source as a variable
- args – argument dictionary to pass to the chart
- legend – color by this column
- figsize – tuple to set figsize
- cmap – matplotlib colormap to use
Returns:
jmpy.plotting.histogram module¶
-
jmpy.plotting.histogram.
histogram
(x, data=None, legend=None, figsize=(12, 6), xscale='linear', yscale='linear', cmap='default', alpha=0.5, cumprob=False, marker='.', bins=25, table=True, fig=None, axes=None, cgrid=None, **kwargs)[source]¶ Parameters: - x – str or ndarray
- data – is x is a str, this is a pd.Dataframe
- legend – str or ndarray,
- figsize – default is 9,6; sets the figure size
- xscale – default is linear, set the scale type [linear, log, symlog]
- yscale – default is linear, set the scale type [linear, log, symlog]
- cmap – colormap to use for plotting
- alpha – default is 0.5
- cumprob – bool, determines if cumprob plot is displayed
- marker – set matplotlib marker
- bins – # of bins to use
- table – bool, default is True, prints the datatable summary to the graph
- kwargs – passed to matplotlib hist function
- fig – matplotlib figure instance for re-use...
Returns:
jmpy.plotting.scatter module¶
-
jmpy.plotting.scatter.
scatter
(x, y, data=None, legend=None, marker='o', alpha=0.5, xscale='linear', yscale='linear', cmap='default', figsize=(12, 6), fit=None, fitparams=None, table=True, fig=None, axes=None, cgrid=None, **kwargs)[source]¶ Scatter plots with regression lines :param x: str or ndarray :param y: str or ndarray :param data: pandas.Dataframe :param legend: str or ndarray, color/fit by this column :param marker: matplotlib marker style :param alpha: float, matplotlib alpha :param xscale: default == linear, any of matplotlib scale types :param yscale: default == linear, any of matplotlib scale types :param cmap: any of matplotlib cmaps :param figsize: default == (9,6); :param fit: [linear, quadratic, smooth, interpolate] :param fitparams: params to pass to fitting function :param table: show the regression table :param kwargs: :return: fig, (axes)