Skip to content

Commit

Permalink
fix quiver aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
isikdogan committed May 6, 2016
1 parent 7574e3d commit df650d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rivamap/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def quiverPlot(psi, orient, saveDest):
U = -psi_s * np.sin(orient_s)
V = psi_s * np.cos(orient_s)

plt.figure(figsize=(9,9))
R, C = psi.shape
aspect_ratio = float(R)/C

plt.figure(figsize=(10, 10*aspect_ratio))
ax = plt.gca()
ax.invert_yaxis()
plt.quiver(U, V, scale=4, width=0.001, pivot='mid', headwidth=0, minlength=0)
Expand Down

0 comments on commit df650d4

Please sign in to comment.