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 90334ba commit a66c671Copy full SHA for a66c671
1 file changed
lib/matplotlib/tests/test_scale.py
@@ -2,6 +2,7 @@
2
from matplotlib.scale import (
3
LogTransform, InvertedLogTransform,
4
SymmetricalLogTransform)
5
+import matplotlib.scale as mscale
6
from matplotlib.testing.decorators import check_figures_equal, image_comparison
7
8
import numpy as np
@@ -198,3 +199,14 @@ def forward(x):
198
199
ax.plot(x, x)
200
ax.set_xscale('function', functions=(forward, inverse))
201
ax.set_xlim(1, 1000)
202
+
203
204
+def test_pass_scale():
205
+ # test passing a scale object works...
206
+ fig, ax = plt.subplots()
207
+ scale = mscale.LogScale(axis=None)
208
+ ax.set_xscale(scale)
209
210
+ ax.set_yscale(scale)
211
+ assert ax.xaxis.get_scale() == 'log'
212
+ assert ax.yaxis.get_scale() == 'log'
0 commit comments