\(\renewcommand\AA{\unicode{x212B}}\)

3D Plots: Surface and Wireframe

3D plotting in Matplotlib

Other Plot Types

General Plot Help



Surface Plots



FigureOptionsGear.png ptions Menu

Plot Options 3D Surface


Scripting

Basic example of plotting a Surface:

from mantid.simpleapi import *
import matplotlib.pyplot as plt

data = Load('MUSR00015189.nxs')
data = mtd['data_1'] # Extract individual workspace from group

fig, ax = plt.subplots(subplot_kw={'projection':'mantid3d'})
ax.plot_surface(data)
plt.show()

(Source code, png, hires.png, pdf)

../_images/3DPlotsHelp-1.png

For more advice: Formatting Plots with a script



Wireframe Plots



Plot Toolbar

Plot Toolbar 3D Wireframe


Change the Color of the Wireframe:

Color Palette Wireframe and Contour

FigureOptionsGear.png ptions Menu

Plot Options 3D Wireframe


Scripting

Basic example of plotting a Wireframe:

from mantid.simpleapi import *
import matplotlib.pyplot as plt

data = Load('MAR11060.nxs')

fig, ax = plt.subplots(subplot_kw={'projection':'mantid3d'})
ax.plot_wireframe(data, color='#1f77b4')
plt.show()

(Source code, png, hires.png, pdf)

../_images/3DPlotsHelp-2.png

For more advice: Formatting Plots with a script