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

Skip to content

Commit 97209bd

Browse files
committed
Allow turning off minor ticks on Colorbar with LogNorm
Allow turning off minor ticks on Colorbar with LogNorm
1 parent 86d961c commit 97209bd

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/matplotlib/colorbar.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,11 +1230,7 @@ def minorticks_off(self):
12301230
ax = self.ax
12311231
long_axis = ax.yaxis if self.orientation == 'vertical' else ax.xaxis
12321232

1233-
if long_axis.get_scale() == 'log':
1234-
cbook._warn_external('minorticks_off() has no effect on a '
1235-
'logarithmic colorbar axis')
1236-
else:
1237-
long_axis.set_minor_locator(ticker.NullLocator())
1233+
long_axis.set_minor_locator(ticker.NullLocator())
12381234

12391235

12401236
@docstring.Substitution(make_axes_kw_doc)

0 commit comments

Comments
 (0)