Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fe5e4e commit e9af134Copy full SHA for e9af134
lib/matplotlib/tests/test_colors.py
@@ -247,6 +247,18 @@ def test_SymLogNorm_colorbar():
247
plt.close(fig)
248
249
250
+def test_SymLogNorm_single_zero():
251
+ """
252
+ Test SymLogNorm to ensure it is not adding sub-ticks to zero label
253
254
+ fig = plt.figure()
255
+ norm = mcolors.SymLogNorm(1e-5, vmin=-1, vmax=1)
256
+ cbar = mcolorbar.ColorbarBase(fig.add_subplot(111), norm=norm)
257
+ ticks = cbar.get_ticks()
258
+ assert sum(ticks == 0) == 1
259
+ plt.close(fig)
260
+
261
262
def _inverse_tester(norm_instance, vals):
263
"""
264
Checks if the inverse of the given normalization is working.
0 commit comments