-
Notifications
You must be signed in to change notification settings - Fork 282
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
annotate velocity in non-cubic datasets #1014
Comments
Original comment by Nathan Goldbaum (Bitbucket: ngoldbaum, GitHub: ngoldbaum): Can you create a short example that illustrates this issue? It helps if you use one of the test datasets on yt-project.org/data, since it then makes it easy for someone else to reproduce and debug the issue locally. Also if you want to take a hand at fixing this yourself, the velocity callback is defined in yt/visualization/plot_modications.py. |
Original comment by Miguel de Val-Borro (Bitbucket: migueldvb, GitHub: migueldvb): I have a dataset which is elongated in one of the spatial dimensions. The number of blocks is chosen so that the cells are roughly cubic so that it has about five times more blocks in the x direction than in z direction. However I think that annotate_velocity distributes the arrows uniformly as if the x and z dimensions were equal which looks like this figure. I wonder if one can scale the displayed arrows by the number of blocks in each dimension which should be related with the real dimensions of the domain. |
Original comment by Nathan Goldbaum (Bitbucket: ngoldbaum, GitHub: ngoldbaum): Right now the number of arrows is fixed along each direction. If you want to change this, you will need to alter the QuiverCallback to (optionally) allow for a different number of arrows along the x and y directions. One way to do this would be to allow the I don't have time to do this right now, but please feel free to go ahead and try for yourself. The callback code is relatively straightforward and self-contained. Please also feel free to raise this issue on the mailing list if you run into trouble. |
Original comment by chummels (Bitbucket: chummels, GitHub: chummels): @migueldvb : Have you made any progress on this? |
Original comment by Miguel de Val-Borro (Bitbucket: migueldvb, GitHub: migueldvb): @ngoldbaum When I replace the |
Originally reported by: Anonymous
It looks like the annotate_velocity method on SlicePlots selects a number of points uniformly distributed in the x and y coordinates but this does not work well for slices where one of the dimensions is much larger than the other. Is it possible to scale the number of displayed arrows with the size of each axis of the domain?
The text was updated successfully, but these errors were encountered: