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

Method bar3d

lib/mpl_toolkits/mplot3d/axes3d.py:3308–3473  ·  view source on GitHub ↗

Generate a 3D barplot. This method creates three-dimensional barplot where the width, depth, height, and color of the bars can all be uniquely set. Parameters ---------- x, y, z : array-like The coordinates of the anchor point of the bar

(self, x, y, z, dx, dy, dz, color=None,
              zsort='average', shade=True, lightsource=None, *args,
              axlim_clip=False, **kwargs)

Source from the content-addressed store, hash-verified

3306
3307 @_preprocess_data()
3308 def bar3d(self, x, y, z, dx, dy, dz, color=None,
3309 zsort='average', shade=True, lightsource=None, *args,
3310 axlim_clip=False, **kwargs):
3311 """
3312 Generate a 3D barplot.
3313
3314 This method creates three-dimensional barplot where the width,
3315 depth, height, and color of the bars can all be uniquely set.
3316
3317 Parameters
3318 ----------
3319 x, y, z : array-like
3320 The coordinates of the anchor point of the bars.
3321
3322 dx, dy, dz : float or array-like
3323 The width, depth, and height of the bars, respectively.
3324
3325 color : sequence of colors, optional
3326 The color of the bars can be specified globally or
3327 individually. This parameter can be:
3328
3329 - A single color, to color all bars the same color.
3330 - An array of colors of length N bars, to color each bar
3331 independently.
3332 - An array of colors of length 6, to color the faces of the
3333 bars similarly.
3334 - An array of colors of length 6 * N bars, to color each face
3335 independently.
3336
3337 When coloring the faces of the boxes specifically, this is
3338 the order of the coloring:
3339
3340 1. -Z (bottom of box)
3341 2. +Z (top of box)
3342 3. -Y
3343 4. +Y
3344 5. -X
3345 6. +X
3346
3347 zsort : {'average', 'min', 'max'}, default: 'average'
3348 The z-axis sorting scheme passed onto `~.art3d.Poly3DCollection`
3349
3350 shade : bool, default: True
3351 When true, this shades the dark sides of the bars (relative
3352 to the plot's source of light).
3353
3354 lightsource : `~matplotlib.colors.LightSource`, optional
3355 The lightsource to use when *shade* is True.
3356
3357 axlim_clip : bool, default: False
3358 Whether to hide the bars with points outside the axes view limits.
3359
3360 .. versionadded:: 3.10
3361
3362 data : indexable object, optional
3363 DATA_PARAMETER_PLACEHOLDER
3364
3365 **kwargs

Callers 8

test_bar3d_colorsFunction · 0.80
test_bar3d_shadedFunction · 0.80
test_bar3d_notshadedFunction · 0.80
test_bar3d_lightsourceFunction · 0.80
test_scale3d_artists_logFunction · 0.80
bar3d_simple.pyFile · 0.80
hist3d.pyFile · 0.80
3d_bars.pyFile · 0.80

Calls 6

auto_scale_xyzMethod · 0.95
has_dataMethod · 0.80
minMethod · 0.80
maxMethod · 0.80
add_collectionMethod · 0.80
get_next_colorMethod · 0.45

Tested by 5

test_bar3d_colorsFunction · 0.64
test_bar3d_shadedFunction · 0.64
test_bar3d_notshadedFunction · 0.64
test_bar3d_lightsourceFunction · 0.64
test_scale3d_artists_logFunction · 0.64