Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e72dc34

Browse files
authored
Merge pull request #28942 from anntzer/cbbs
In colorbar docs, add ref from 'boundaries' doc to 'spacing' doc.
2 parents 60458da + ccb788e commit e72dc34

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lib/matplotlib/colorbar.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@
8686
If *False* the minimum and maximum colorbar extensions will be triangular
8787
(the default). If *True* the extensions will be rectangular.
8888
89-
spacing : {'uniform', 'proportional'}
90-
For discrete colorbars (`.BoundaryNorm` or contours), 'uniform' gives each
91-
color the same space; 'proportional' makes the space proportional to the
92-
data interval.
93-
9489
ticks : None or list of ticks or Locator
9590
If None, ticks are determined automatically from the input.
9691
@@ -109,9 +104,15 @@
109104
If unset, the colormap will be displayed on a 0-1 scale.
110105
If sequences, *values* must have a length 1 less than *boundaries*. For
111106
each region delimited by adjacent entries in *boundaries*, the color mapped
112-
to the corresponding value in values will be used.
107+
to the corresponding value in *values* will be used. The size of each
108+
region is determined by the *spacing* parameter.
113109
Normally only useful for indexed colors (i.e. ``norm=NoNorm()``) or other
114-
unusual circumstances.""")
110+
unusual circumstances.
111+
112+
spacing : {'uniform', 'proportional'}
113+
For discrete colorbars (`.BoundaryNorm` or contours), 'uniform' gives each
114+
color the same space; 'proportional' makes the space proportional to the
115+
data interval.""")
115116

116117

117118
def _set_ticks_on_axis_warn(*args, **kwargs):

0 commit comments

Comments
 (0)