surf3d#
- class surf3d(data, x=None, y=None, fig=None, ax=None, returnfig=False, colorbar=True, figkwargs=None, axkwargs=None, plotkwargs=None, **kwargs)[source]#
Plot 2D data as a 3D surface
- Parameters:
data (arr) – 2D data
x (arr) – 1D vector or 2D grid of x coordinates (optional)
y (arr) – 1D vector or 2D grid of y coordinates (optional)
fig (fig) – an existing figure to draw the plot in (or set to True to create a new figure)
ax (axes) – an existing axes to draw the plot in
returnfig (bool) – whether to return the figure, or just the axes
colorbar (bool) – whether to plot a colorbar
figkwargs (dict) – passed to figure()
axkwargs (dict) – passed to axes()
plotkwargs (dict) – passed to plot()
kwargs (dict) – also passed to plot()
Example:
data = sc.smooth(pl.rand(30,50)) sc.surf3d(data)