plot_data¶
- pySurf.data2D.plot_data(data, x=None, y=None, title=None, outfile=None, units=None, stats=False, vars=None, loc=0, contour=False, colors=None, largs=None, framealpha=0.5, nsigma=None, *args, **kwargs)¶
Plot data using imshow and modifying some default properties. Units for x,y,z can be passed as 3-el array or scalar, None can be used to ignore unit. Broadcast all imshow arguments. stats is a flag to print stats on plot. Here it can be assigned booleanTrue or integer value: True or 1 plots statistics, 2 plots x and y spans largs is a dictionary of arguments passed to caption in plotting.caption.legendbox (used only if stats are plotted).
(e.g. {‘color’:’r’}
Returns axis (modified 2023/01/17, was returning axim as returned by plt.imshow). nsigma set colorscale to this multiple of data standard deviation. In alternative can be a dictionary containing arguments for remove_outliers. If None (default) range is not changed from matplotlib defaults. If dict, a nummber of parameters for can be passed to remove_outliers.remove_outliers to determine color range (data are left intact).
2020/11/05 updated all stats functions. 2020/07/14 added flag contour to overplot contours, and colors, to be passed to plt.contour