Created
July 25, 2014 22:35
-
-
Save tacaswell/a11a149d6b7557966f0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this bit of code makes sure that the head stays a fixed size in terms of | |
# axes fractions. To tune this size change `head_size` | |
head_size = 30 | |
# to tun the ratio between the head size and the shaft, change `ascale` | |
ascale = .2 | |
# tunes how 'pinched' the arrow head is, < 1 and the bottom will be indented | |
# > 1 the arrow will be a distorted diamond | |
pinched = .7 | |
# tunes how wide the arrow head is relative to the length of the arrow head | |
# <1 -> pointyer | |
# >1 -> broader | |
aspect = .5 | |
# don't mess with these! | |
width = .0005 * ascale | |
head = head_size / ascale | |
# make the quiver plot with triangular heads | |
ax.quiver(X,Y,U,V,angles='xy',scale_units='xy',scale=2, minshaft=.01, width=width, | |
headlength=head, headaxislength=pinched * head, headwidth=head*aspect) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment