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

Skip to content

Commit 146280b

Browse files
committed
Add documentation of colorbar issue matplotlib#1188 to colorbar documentation
1 parent fed7557 commit 146280b

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

lib/matplotlib/colorbar.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,19 @@
174174
the axes objects in which the mappable and the colorbar are drawn. In
175175
this case, do not use any of the axes properties kwargs.
176176
177+
It is known that some vector graphics viewer (svg and pdf) renders white gaps
178+
between segments of the colorbar. This is due to bugs in the viewers not
179+
matplotlib. As a workaround the colorbar can be rendered with overlapping
180+
segments::
181+
182+
cbar = colorbar()
183+
cbar.solids.set_edgecolor("face")
184+
draw()
185+
186+
However this has negative consequences in other circumstances. Particularly with
187+
semi transparent images (alpha < 1) and colorbar extensions and is not enabled
188+
by default see (issue #1188).
189+
177190
returns:
178191
:class:`~matplotlib.colorbar.Colorbar` instance; see also its base class,
179192
:class:`~matplotlib.colorbar.ColorbarBase`. Call the

lib/mpl_toolkits/axes_grid/colorbar.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,19 @@
144144
the axes objects in which the mappable and the colorbar are drawn. In
145145
this case, do not use any of the axes properties kwargs.
146146
147+
It is known that some vector graphics viewer (svg and pdf) renders white gaps
148+
between segments of the colorbar. This is due to bugs in the viewers not
149+
matplotlib. As a workaround the colorbar can be rendered with overlapping
150+
segments::
151+
152+
cbar = colorbar()
153+
cbar.solids.set_edgecolor("face")
154+
draw()
155+
156+
However this has negative consequences in other circumstances. Particularly with
157+
semi transparent images (alpha < 1) and colorbar extensions and is not enabled
158+
by default see (issue #1188).
159+
147160
returns:
148161
:class:`~matplotlib.colorbar.Colorbar` instance; see also its base class,
149162
:class:`~matplotlib.colorbar.ColorbarBase`. Call the

lib/mpl_toolkits/axes_grid1/colorbar.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,19 @@
144144
the axes objects in which the mappable and the colorbar are drawn. In
145145
this case, do not use any of the axes properties kwargs.
146146
147+
It is known that some vector graphics viewer (svg and pdf) renders white gaps
148+
between segments of the colorbar. This is due to bugs in the viewers not
149+
matplotlib. As a workaround the colorbar can be rendered with overlapping
150+
segments::
151+
152+
cbar = colorbar()
153+
cbar.solids.set_edgecolor("face")
154+
draw()
155+
156+
However this has negative consequences in other circumstances. Particularly with
157+
semi transparent images (alpha < 1) and colorbar extensions and is not enabled
158+
by default see (issue #1188).
159+
147160
returns:
148161
:class:`~matplotlib.colorbar.Colorbar` instance; see also its base class,
149162
:class:`~matplotlib.colorbar.ColorbarBase`. Call the

0 commit comments

Comments
 (0)