SimPEG.utils.plot2Ddata#

SimPEG.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={})[source]#

Interpolate and plot unstructured 2D data.

General plotting for scalar and vector quantities as a function of their x and y locations. plot2Ddata uses interpolates the unstructured data to a specified set of gridded locations before plotting with matplotlib.pyplot.contourf(). For vectors, matplotlib.pyplot.streamplot() is used to add a stream plot. As this function produces a plot for 2D data, the vertical position and vertical vector component (in the case of a vector) is ignored.

Parameters
xyznumpy.ndarray

Data locations [x,y(,z)]. If the data locations are defined in 3D, the z-column is ignored.

datanumpy.ndarray

Data values. For scalar quantities, the data are stored in a 1D numpy.ndarray. For vector quantities, data are stored in a numpy array of shape (N, dim).

vecbool

If True, the data values represent a vector quantity and the function creates a stream plot illustrating the x and y components of the vector.

nxint

Number of grid locations along x-direction

nyint

Number of grid locations along y-direction

axmatplotlib.axes

An axes object on which to plot. If None, the function creates an axes object

masknumpy.ndarray of bool

Locations in the unstructured grid whose data are masked.

levelbool

If True, adds contours according to matplotlib.pyplot.contour()

fignamestr

Figure name

ncontourint

number of contours in the contour plot

datalocbool

If True, plot the data locations

contourOptsdict

Dictionary defining keyword arguments when matplotlib.pyplot.contourf() is called

levelOptsdict

Dictionary defining keyword arguments when matplotlib.pyplot.contourf() is called. This is only necessary when level = True.

clim(2) numpy.ndarray

Colorbar limits

methodstr

Interpolation method used to approximate at gridded locations. Must be ‘linear’ or ‘nearest’

shadebool

If True, add shading to the plot

shade_ncontourint

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

shade_azimuthfloat

Azimuthal angle for the light source if shading

shade_angle_altitudefloat

Altitude angle for the light source if shading

Returns
contmatplotlib.contour.ContourSet

The filled contour plot

axmatplotlib.axes

The axes object for the plot.

CSmatplotlib.contour.ContourSet

If the input parameter levels is True, the function outputs the level set for the contours

Galleries and Tutorials using SimPEG.utils.plot2Ddata#

Magnetic inversion on a TreeMesh

Magnetic inversion on a TreeMesh

Magnetic inversion on a TreeMesh
Magnetic Amplitude inversion on a TreeMesh

Magnetic Amplitude inversion on a TreeMesh

Magnetic Amplitude inversion on a TreeMesh
Heagy et al., 2017 1D RESOLVE and SkyTEM Bookpurnong Inversions

Heagy et al., 2017 1D RESOLVE and SkyTEM Bookpurnong Inversions

Heagy et al., 2017 1D RESOLVE and SkyTEM Bookpurnong Inversions
Heagy et al., 2017 1D RESOLVE Bookpurnong Inversion

Heagy et al., 2017 1D RESOLVE Bookpurnong Inversion

Heagy et al., 2017 1D RESOLVE Bookpurnong Inversion
PF: Gravity: Laguna del Maule Bouguer Gravity

PF: Gravity: Laguna del Maule Bouguer Gravity

PF: Gravity: Laguna del Maule Bouguer Gravity
Heagy et al., 2017 Load and Plot Bookpurnong Data

Heagy et al., 2017 Load and Plot Bookpurnong Data

Heagy et al., 2017 Load and Plot Bookpurnong Data
Forward Simulation of VRM Response on a Tree Mesh

Forward Simulation of VRM Response on a Tree Mesh

Forward Simulation of VRM Response on a Tree Mesh
3D Forward Simulation on a Tree Mesh

3D Forward Simulation on a Tree Mesh

3D Forward Simulation on a Tree Mesh
Forward Simulation of Gravity Anomaly Data on a Tensor Mesh

Forward Simulation of Gravity Anomaly Data on a Tensor Mesh

Forward Simulation of Gravity Anomaly Data on a Tensor Mesh
Forward Simulation of Gradiometry Data on a Tree Mesh

Forward Simulation of Gradiometry Data on a Tree Mesh

Forward Simulation of Gradiometry Data on a Tree Mesh
Least-Squares Inversion of Gravity Anomaly Data

Least-Squares Inversion of Gravity Anomaly Data

Least-Squares Inversion of Gravity Anomaly Data
Sparse Norm Inversion of Gravity Anomaly Data

Sparse Norm Inversion of Gravity Anomaly Data

Sparse Norm Inversion of Gravity Anomaly Data
Joint PGI of Gravity + Magnetic on an Octree mesh using full petrophysical information

Joint PGI of Gravity + Magnetic on an Octree mesh using full petrophysical information

Joint PGI of Gravity + Magnetic on an Octree mesh using full petrophysical information
Joint PGI of Gravity + Magnetic on an Octree mesh without petrophysical information

Joint PGI of Gravity + Magnetic on an Octree mesh without petrophysical information

Joint PGI of Gravity + Magnetic on an Octree mesh without petrophysical information
Forward Simulation of Total Magnetic Intensity Data

Forward Simulation of Total Magnetic Intensity Data

Forward Simulation of Total Magnetic Intensity Data
Forward Simulation of Gradiometry Data for Magnetic Vector Models

Forward Simulation of Gradiometry Data for Magnetic Vector Models

Forward Simulation of Gradiometry Data for Magnetic Vector Models
Sparse Norm Inversion for Total Magnetic Intensity Data on a Tensor Mesh

Sparse Norm Inversion for Total Magnetic Intensity Data on a Tensor Mesh

Sparse Norm Inversion for Total Magnetic Intensity Data on a Tensor Mesh
3D Forward Simulation with User-Defined Waveforms

3D Forward Simulation with User-Defined Waveforms

3D Forward Simulation with User-Defined Waveforms
Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data

Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data

Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data