Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ccb788e

Browse filesBrowse files
committed
In colorbar docs, add ref from 'boundaries' doc to 'spacing' doc.
The `spacing` kwarg only makes sense in relation to `boundaries`, so put the docs for them next to one another and add an explicit reference from `boundaries` to `spacing`. (The order of the kwargs in the signature did not change, because it already doesn't match the docs anyways; reordering them could be done separately.)
1 parent cf84d9a commit ccb788e
Copy full SHA for ccb788e

File tree

Expand file treeCollapse file tree

1 file changed

+8
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-7
lines changed

‎lib/matplotlib/colorbar.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colorbar.py
+8-7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.