geoana.plotting_utils.plot2Ddata#

geoana.plotting_utils.plot2Ddata(xyz, data, vec=False, nx=100, ny=100, ax=None, mask=None, level=False, figname=None, ncontour=10, dataloc=False, contourOpts={}, levelOpts={}, streamplotOpts={}, scale='linear', clim=None, method='linear', shade=False, shade_ncontour=100, shade_azimuth=-45.0, shade_angle_altitude=45.0, shadeOpts={})#

Take unstructured xy points, interpolate, then plot in 2D

Parameters:
xyz(n, dim) numpy.ndarray

Data locations. Only the first two columns are used if an (n, 3) array is entered.

data(n) or (n, 2) np.ndarray

Data values. Either scalar or 2D vector.

vecbool

Default = False. Plot vector data. If False, the data input argument is scalar-valued. If True, the data input arument is vector.

nxint

number of x grid locations

nyint

number of y grid locations

axmatplotlib.axes

An axes object

masknp.ndarray of bool

Masking array

level: bool

To plot or not

fignamestring

figure name

ncontourint

number of matplotlib.pyplot.contourf() contours

datalocbool

If True, plot the data locations. If False, do not. Default = False

contourOptsdict

Contour plot options. Dictionary of matplotlib.pyplot.contourf() options

levelOptsdict

Level options. Dictionary of matplotlib.pyplot.contour() options

clim(2) np.ndarray

Colorbar limits

methodstr {‘linear’, ‘nearest’}

interpolation method from xyz locations and the gridded locations for the contour plot

shadebool

Add shading to the plot. Default = False

shade_ncontourint

number of matplotlib.pyplot.contourf() contours for the shading

shade_azimuthfloat

azimuth for the light source in shading

shade_angle_altitudefloat

angle altitude for the light source in shading

shapeOptsdict

Dictionary of matplotlib.pyplot.contourf() options

Returns:
matplotlib.pyplot.contourf()

Contour object

matplotlib.axes

Axes