-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
fix streamplot 3D default arrow size #3525
Conversation
src/basic_recipes/streamplot.jl
Outdated
@@ -28,7 +28,7 @@ See the function `Makie.streamplot_impl` for implementation details. | |||
maxsteps = 500, | |||
color = norm, | |||
|
|||
arrow_size = 15, | |||
arrow_size = nothing, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be automatic
since we generally use that instead of nothing when things get derived later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've changed nothing
to automatic
!
src/basic_recipes/streamplot.jl
Outdated
if p.arrow_size[] === automatic | ||
if N == 3 | ||
arrow_size = 0.2 * minimum(p.limits[].widths) / minimum(p.gridsize[]) | ||
else | ||
arrow_size = 15 | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing an else branch which is why tests are failing. Might also be good to reorganize this so that p.arrow_size
can change from automatic to some value. I.e. use arrow_size = map(p.arrow_size, p.limits, p.gridsize) do ...
.
@ffreyer thanks for cleaning this up. Much appreciated. |
Description
Fixes #3504
The default arrow size in 3D streamplot is set to
0.2 * minimum(limits.width) / minimum(gridsize)
per @chakravala's comment in #3504.
The default arrow size in 2D streamplot remains 15 px.
Type of change