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.
2 parents 7457eda + e213f4b commit 928d6d5Copy full SHA for 928d6d5
2 files changed
lib/matplotlib/spines.py
@@ -481,15 +481,15 @@ def linear_spine(cls, axes, spine_type, **kwargs):
481
"""
482
(staticmethod) Returns a linear :class:`Spine`.
483
484
- # all values of 13 get replaced upon call to set_bounds()
+ # all values of 0.999 get replaced upon call to set_bounds()
485
if spine_type == 'left':
486
- path = mpath.Path([(0.0, 13), (0.0, 13)])
+ path = mpath.Path([(0.0, 0.999), (0.0, 0.999)])
487
elif spine_type == 'right':
488
- path = mpath.Path([(1.0, 13), (1.0, 13)])
+ path = mpath.Path([(1.0, 0.999), (1.0, 0.999)])
489
elif spine_type == 'bottom':
490
- path = mpath.Path([(13, 0.0), (13, 0.0)])
+ path = mpath.Path([(0.999, 0.0), (0.999, 0.0)])
491
elif spine_type == 'top':
492
- path = mpath.Path([(13, 1.0), (13, 1.0)])
+ path = mpath.Path([(0.999, 1.0), (0.999, 1.0)])
493
else:
494
raise ValueError('unable to make path for spine "%s"' % spine_type)
495
result = cls(axes, spine_type, path, **kwargs)
lib/matplotlib/tests/test_scale.py
@@ -17,15 +17,19 @@ def test_log_scales():
17
@image_comparison(baseline_images=['logit_scales'], remove_text=True,
18
extensions=['png'])
19
def test_logit_scales():
20
- ax = plt.figure().add_subplot(111, xscale='logit')
+ fig, ax = plt.subplots()
21
22
# Typical extinction curve for logit
23
x = np.array([0.001, 0.003, 0.01, 0.03, 0.1, 0.2, 0.3, 0.4, 0.5,
24
0.6, 0.7, 0.8, 0.9, 0.97, 0.99, 0.997, 0.999])
25
y = 1.0 / x
26
27
ax.plot(x, y)
28
+ ax.set_xscale('logit')
29
ax.grid(True)
30
+ bbox = ax.get_tightbbox(fig.canvas.get_renderer())
31
+ assert np.isfinite(bbox.x0)
32
+ assert np.isfinite(bbox.y0)
33
34
35
def test_log_scatter():
0 commit comments