Skip to content

Commit e43a1dd

Browse files
committed
Add a polar log test
1 parent f0856a6 commit e43a1dd

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/matplotlib/tests/test_polar.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,3 +434,15 @@ def test_cursor_precision():
434434
assert ax.format_coord(2, 0) == "θ=0.6π (115°), r=0.000"
435435
assert ax.format_coord(2, .1) == "θ=0.64π (115°), r=0.100"
436436
assert ax.format_coord(2, 1) == "θ=0.637π (114.6°), r=1.000"
437+
438+
439+
@image_comparison(['polar_log.png'], style='default')
440+
def test_polar_log():
441+
fig = plt.figure()
442+
ax = fig.add_subplot(polar=True)
443+
444+
ax.set_yscale('log')
445+
ax.set_ylim(1, 1000)
446+
447+
n = 100
448+
ax.plot(np.linspace(0, 2 * np.pi, n), np.logspace(0, 2, n))

0 commit comments

Comments
 (0)