-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Proposes a 3D quiver #3134
Proposes a 3D quiver #3134
Conversation
That is a really good addition. I don't know about plotly, but as a test it would be sufficient to add an example at the end of the examples array here https://github.com/JuliaPlots/Plots.jl/blob/master/src/examples.jl, add the number to the excludes of the backends where it doesn't work and then do a PR against PlotReferenceImages to add the reference image for the GR backend. |
Thanks, I have to check how one can add things to that list, but then I'll do that for sure. |
Bump version
* add linestyle to contour plots * Update precompile_*.jl file (JuliaPlots#3140) Co-authored-by: BeastyBlacksmith <BeastyBlacksmith@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: BeastyBlacksmith <BeastyBlacksmith@users.noreply.github.com>
Uh, nice! I was just starting to test and got lost in GR arrow head sizes and (maybe) missing scaling of quivers, when I wanted to add a 2D example (found a bug in my code, too). Will update/merge that here, then. |
I'm sorry about that commit mess above. I added a new test example. I hope that's fine. using Plots
ϕs = range(-π, π, length=50)
θs = range(0, π, length=25)
θqs = range(1, π-1, length=25)
x = vec([sin(θ) * cos(ϕ) for (ϕ, θ) in Iterators.product(ϕs, θs)])
y = vec([sin(θ) * sin(ϕ) for (ϕ, θ) in Iterators.product(ϕs, θs)])
z = vec([cos(θ) for (ϕ, θ) in Iterators.product(ϕs, θs)])
u = 0.1 * vec([sin(θ) * cos(ϕ) for (ϕ, θ) in Iterators.product(ϕs, θqs)])
v = 0.1 * vec([sin(θ) * sin(ϕ) for (ϕ, θ) in Iterators.product(ϕs, θqs)])
w = 0.1 * vec([cos(θ) for (ϕ, θ) in Iterators.product(ϕs, θqs)])
quiver(x,y,z, quiver=(u,v,w)) |
oh, what a neat example! |
I was thinking about adding a 2D quiver example, too, but got lost since this
has huge arrowheads in |
I think we can also investigate the arrowhead size issue and the 2D example in another issue/PR. |
I like the auto-scaling idea. |
Ok, sure. |
Thanks for your contribution @kellertuer ! |
This PR introduces a quiver functionality (at least partially, see below) for 3D quivers, cf. #319.
This extension can be seen by looking at
which was previously a little strange (took
x
andz
butu
andw
, first and last quiver component)and now it correctly looks like
Works/tested with
Questions
Plotly
?