Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a8c60e

Browse files
author
Tuan333
committed
base line image and test case for polar projection
1 parent 2430cc4 commit 4a8c60e

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import math
2+
3+
import matplotlib.pyplot as plt
4+
from matplotlib import patches
5+
import matplotlib
6+
from matplotlib.testing.decorators import image_comparison
7+
8+
9+
@image_comparison(baseline_images=['polar_proj'],extensions=['png'])
10+
def test_adding_rectangle_patch():
11+
fig = plt.figure(figsize=(640/80,640/80), dpi = 80)
12+
ax = fig.add_subplot(111, projection='polar')
13+
14+
# add quadrant as example
15+
ax.add_patch(
16+
patches.Rectangle(
17+
(0, 1), width=math.pi * 0.5, height=0.5
18+
)
19+
)
20+
ax.bar(0, 1).remove()
21+
ax.set_rmax(2)

0 commit comments

Comments
 (0)