neutronpy.data.Data.plot

Data.plot(x=None, y=None, z=None, w=None, show_err=True, to_bin=None, plot_options=None, fit_options=None, smooth_options=None, output_file='', show_plot=True, **kwargs)[source]

Plots the data in the class. x and y must at least be specified, and z and/or w being specified will produce higher dimensional plots (contour and volume, respectively).

Parameters:
x : str, optional

data_column key defining the x-axis. Default: plot_default_x.

y : str, optional

data_column key defining the y-axis. Default: plot_default_y.

z : str, optional

data_column key defining the z-axis. Default: None

w : str, optional

data_column key defining the w-axis. Default: None

bounds : dict, optional

If set, data will be rebinned to the specified parameters, in the format [min, max, num points] for each data_column key. See documentation for Data.bin. Default: None

show_err : bool, optional

Plot error bars. Only applies to xy scatter plots. Default: True

show_plot : bool, optional

Execute plt.show() to show the plot. Incompatible with output_file param. Default: True

output_file : str, optional

If set, the plot will be saved to the location given, in the format specified, provided that the format is supported. Default: None

plot_options : dict, optional

Plot options to be passed to the the matplotlib plotting routine. Default: None

fit_options : dict, optional

Fitting options to be passed to the Fitter routine. Default: None

smooth_otions : dict, optional

Smoothing options for Gaussian smoothing from scipy.ndimage.filters.gaussian_filter. Default: None

kwargs : optional

Additional plotting keyword arguments passed to the plotting function.