Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Make plot_displacements more flexible; change default arrow appearance. #105

Merged
merged 1 commit into from
Jul 25, 2014

Conversation

danielballan
Copy link
Member

This reworks plot_displacements, a barely-documented function that makes plots like this:

image

The most important feature added is the optional scale argument, which makes it possible to study small displacements by uniformly enlarging the arrows to some reasonable size.

Also, I replace matplotlib's arrow axis method with the more general annotate. Strangely, arrow gives much less control over the look over the arrows.

Note to selves: The whole plots file needs some attention -- PEP8 and general housekeeping. I only lightly edited it when merging it in from my mr repository. After we merge Rebecca's #104 I will do some cleanup.

@tacaswell
Copy link
Member

We have a plots.py ?!

Why don't you use quiver, it take care of most of these details for you and is also a colormappable so you can set the colors via a cmap + array.

@danielballan
Copy link
Member Author

Haha. OK, I'll look at quiver and bump the issue.

tacaswell added a commit that referenced this pull request Jul 25, 2014
ENH: Make plot_displacements more flexible; change default arrow appearance.

This should really be done with quiver, but is very annoying to get the arrows to look good.
@tacaswell tacaswell merged commit 74af347 into soft-matter:master Jul 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants