MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / plot_surface

Method plot_surface

lib/mpl_toolkits/mplot3d/axes3d.py:2376–2573  ·  view source on GitHub ↗

Create a surface plot. By default, it will be colored in shades of a solid color, but it also supports colormapping by supplying the *cmap* argument. .. note:: The *rcount* and *ccount* kwargs, which both default to 50, determine the maximum

(self, X, Y, Z, *, norm=None, vmin=None,
                     vmax=None, lightsource=None, axlim_clip=False, **kwargs)

Source from the content-addressed store, hash-verified

2374 return polyc
2375
2376 def plot_surface(self, X, Y, Z, *, norm=None, vmin=None,
2377 vmax=None, lightsource=None, axlim_clip=False, **kwargs):
2378 """
2379 Create a surface plot.
2380
2381 By default, it will be colored in shades of a solid color, but it also
2382 supports colormapping by supplying the *cmap* argument.
2383
2384 .. note::
2385
2386 The *rcount* and *ccount* kwargs, which both default to 50,
2387 determine the maximum number of samples used in each direction. If
2388 the input data is larger, it will be downsampled (by slicing) to
2389 these numbers of points.
2390
2391 .. note::
2392
2393 To maximize rendering speed consider setting *rstride* and *cstride*
2394 to divisors of the number of rows minus 1 and columns minus 1
2395 respectively. For example, given 51 rows rstride can be any of the
2396 divisors of 50.
2397
2398 Similarly, a setting of *rstride* and *cstride* equal to 1 (or
2399 *rcount* and *ccount* equal the number of rows and columns) can use
2400 the optimized path.
2401
2402 Parameters
2403 ----------
2404 X, Y, Z : 2D arrays
2405 Data values.
2406
2407 rcount, ccount : int
2408 Maximum number of samples used in each direction. If the input
2409 data is larger, it will be downsampled (by slicing) to these
2410 numbers of points. Defaults to 50.
2411
2412 rstride, cstride : int
2413 Downsampling stride in each direction. These arguments are
2414 mutually exclusive with *rcount* and *ccount*. If only one of
2415 *rstride* or *cstride* is set, the other defaults to 10.
2416
2417 'classic' mode uses a default of ``rstride = cstride = 10`` instead
2418 of the new default of ``rcount = ccount = 50``.
2419
2420 color : :mpltype:`color`
2421 Color of the surface patches.
2422
2423 cmap : Colormap, optional
2424 Colormap of the surface patches.
2425
2426 facecolors : list of :mpltype:`color`
2427 Colors of each individual patch.
2428
2429 norm : `~matplotlib.colors.Normalize`, optional
2430 Normalization for the colormap.
2431
2432 vmin, vmax : float, optional
2433 Bounds for the normalization.

Callers 15

test_mixedsubplotsFunction · 0.80
test_surface3dFunction · 0.80
test_surface3d_shadedFunction · 0.80
test_surface3d_maskedFunction · 0.80
test_mixedsamplesraisesFunction · 0.80
test_axlim_clipFunction · 0.80
test_equal_box_aspectFunction · 0.80
test_computed_zorderFunction · 0.80

Calls 10

auto_scale_xyzMethod · 0.95
has_dataMethod · 0.80
add_collectionMethod · 0.80
popMethod · 0.45
getMethod · 0.45
set_arrayMethod · 0.45
set_climMethod · 0.45
set_normMethod · 0.45
get_next_colorMethod · 0.45
to_rgbaMethod · 0.45

Tested by 15

test_mixedsubplotsFunction · 0.64
test_surface3dFunction · 0.64
test_surface3d_shadedFunction · 0.64
test_surface3d_maskedFunction · 0.64
test_mixedsamplesraisesFunction · 0.64
test_axlim_clipFunction · 0.64
test_equal_box_aspectFunction · 0.64
test_computed_zorderFunction · 0.64