CSDMAxes

class csdmpy.helper_functions.CSDMAxes(fig, *args, facecolor=None, frameon=True, sharex=None, sharey=None, label='', xscale=None, yscale=None, box_aspect=None, **kwargs)[source]

Bases: matplotlib.axes._axes.Axes

A custom CSDM data plot axes.

Methods Summary

plot

Generate a figure axes using the plot method from the matplotlib library.

scatter

Generate a figure axes using the scatter method from the matplotlib library.

imshow

Generate a figure axes using the imshow method from the matplotlib library.

contour

Generate a figure axes using the contour method from the matplotlib library.

contourf

Generate a figure axes using the contourf method from the matplotlib library.

Method Documentation

plot(csdm, *args, **kwargs)[source]

Generate a figure axes using the plot method from the matplotlib library.

Apply to all 1D datasets with single-component dependent-variables. For multiple dependent variables, the data from individual dependent-variables is plotted on the same figure.

Parameters
  • csdm – A CSDM object of a one-dimensional dataset.

  • kwargs – Additional keyword arguments for the matplotlib plot() method.

Example

>>> ax = plt.subplot(projection='csdm') 
>>> ax.plot(csdm_object) 
>>> plt.show() 
scatter(csdm, *args, **kwargs)[source]

Generate a figure axes using the scatter method from the matplotlib library.

Apply to all 1D datasets with single-component dependent-variables. For multiple dependent variables, the data from individual dependent-variables is plotted on the same figure.

Parameters
  • csdm – A CSDM object of a one-dimensional dataset.

  • kwargs – Additional keyword arguments for the matplotlib plot() method.

Example

>>> ax = plt.subplot(projection='csdm') 
>>> ax.scatter(csdm_object) 
>>> plt.show() 
imshow(csdm, origin='lower', *args, **kwargs)[source]

Generate a figure axes using the imshow method from the matplotlib library.

Apply to all 2D datasets with either single-component (scalar), three-components (pixel_3), or four-components (pixel_4) dependent-variables. For single-component (scalar) dependent-variable, a colormap image is produced. For three-components (pixel_3) dependent-variable, an RGB image is produced. For four-components (pixel_4) dependent-variable, an RGBA image is produced.

For multiple dependent variables, the data from individual dependent-variables is plotted on the same figure.

Parameters
  • csdm – A CSDM object of a two-dimensional dataset with scalar, pixel_3, or pixel_4 quantity_type dependent variable.

  • origin – The matplotlib origin argument. In matplotlib, the default is ‘upper’. In csdmpy, however, the default to ‘lower’.

  • kwargs – Additional keyword arguments for the matplotlib imshow() method.

Example

>>> ax = plt.subplot(projection='csdm') 
>>> ax.imshow(csdm_object) 
>>> plt.show() 
contour(csdm, *args, **kwargs)[source]

Generate a figure axes using the contour method from the matplotlib library.

Apply to all 2D datasets with a single-component (scalar) dependent-variables. For multiple dependent variables, the data from individual dependent-variables is plotted on the same figure.

Parameters
  • csdm – A CSDM object of a two-dimensional dataset with scalar dependent variable.

  • kwargs – Additional keyword arguments for the matplotlib contour() method.

Example

>>> ax = plt.subplot(projection='csdm') 
>>> ax.contour(csdm_object) 
>>> plt.show() 
contourf(csdm, *args, **kwargs)[source]

Generate a figure axes using the contourf method from the matplotlib library.

Apply to all 2D datasets with a single-component (scalar) dependent-variables. For multiple dependent variables, the data from individual dependent-variables is plotted on the same figure.

Parameters
  • csdm – A CSDM object of a two-dimensional dataset with scalar dependent variable.

  • kwargs – Additional keyword arguments for the matplotlib contourf() method.

Example

>>> ax = plt.subplot(projection='csdm') 
>>> ax.contourf(csdm_object) 
>>> plt.show()