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 a66c671

Browse filesBrowse files
committed
TST: add a test
1 parent 90334ba commit a66c671
Copy full SHA for a66c671

File tree

Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed

‎lib/matplotlib/tests/test_scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_scale.py
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from matplotlib.scale import (
33
LogTransform, InvertedLogTransform,
44
SymmetricalLogTransform)
5+
import matplotlib.scale as mscale
56
from matplotlib.testing.decorators import check_figures_equal, image_comparison
67

78
import numpy as np
@@ -198,3 +199,14 @@ def forward(x):
198199
ax.plot(x, x)
199200
ax.set_xscale('function', functions=(forward, inverse))
200201
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+
scale = mscale.LogScale(axis=None)
210+
ax.set_yscale(scale)
211+
assert ax.xaxis.get_scale() == 'log'
212+
assert ax.yaxis.get_scale() == 'log'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.