Skip to content

Commit f1e8f6e

Browse files
committed
add rotation capabilities for scatter plot and PathCollection
1 parent 5e5cf0c commit f1e8f6e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import matplotlib.pyplot as plt
2+
from numpy import arange, pi, cos, sin
3+
from numpy.random import rand
4+
5+
# unit area ellipse
6+
rx, ry = 3., 1.
7+
area = rx * ry * pi
8+
theta = arange(0, 2*pi+0.01, 0.1)
9+
verts = list(zip(rx/area*cos(theta), ry/area*sin(theta)))
10+
11+
x,y,s,c = rand(4, 30)
12+
s*= 10**2.
13+
14+
fig, ax = plt.subplots()
15+
ax.scatter(x,y,s,c,marker=None,verts =verts)
16+
17+
plt.show()

0 commit comments

Comments
 (0)