Comments (8)
I spent a little more time digging around and found that the issue is a very bad default value for arrow_size in streamplot. Maybe the arrows are not getting rescaled correctly? It is possible to manually set arrow_size to something small to reproduce the old behavior of streamplot, but it'd be nice if it just worked.
from makie.jl.
I don't think this is a regression. For 3D streamplots (and arrows) markersize is relative to data units, so any static size we set is going to be bad in some cases. In 2D it's given in pixel units, so it's not a problem. Maybe it would be good to calculate the bounding box of the initially given data and use that to set the default arrow size.
from makie.jl.
With 3D scatterplots, the markersize is not relative to data units, so scatter(ps)
and scatter(100*ps)
display the same plot. Perhaps 3D streamplots could use the same idea (or code) so that, say, one unit of arrow size is worth so many units of scatterplot markersize?
from makie.jl.
Maybe it would be good to calculate the bounding box of the initially given data and use that to set the default arrow size.
It's surprising this isn't being done, obviously you don't typically want arrows that are larger than the boundary, most likely you want the size of the arrows to also depend on how many streams are in the grid. For example if there is a 10,10 grid of streams then they can be larger than for a 25,25 grid of streams. If I were designing this, I would consider computing the default arrow size not only based on the boundary but also on the number of streams in the grid. Larger number of streams obviously require smaller arrow sizes, all proportional to the overall boundaries.
from makie.jl.
Feel free to PR such an improvement :)
It's only not there, because nobody has put the time into perfectioning the arrow recipe.
from makie.jl.
Here's a possible way to define it, I believe these proportions are appropriate:
arrow_size = 0.2minimum(limits.width)/minimum(gridsize)
However; I'm not sure how the limits
values can be accessed from the @recipe
macro, so I don't have a PR.
from makie.jl.
I implemented @chakravala's suggestion in the above pull request. It seems to work.
Any suggestions for the PR?
from makie.jl.
Since we're at it, I dislike the 32,32,32
default gridsize
, it should really be 16,16,16
for 3D, while for 2D the 32 is fine.
Consider 32^3 = 32768
vs 16^3 = 4096
vs 32^2 = 1024
. The 3D default gridsize ought to be 16,16,16
. It's also very dense visually to have a 32,32,32 grid of streams. Having something less dense by default is pretty much always necessary.
Since PR #3525 depends on the gridsize
, either it needs to be added to that PR or on a separate PR after that is merged.
from makie.jl.
Related Issues (20)
- Units in axis labels HOT 2
- Disable Automatic Unit Conversion
- Units in colorbar
- contour[f] doesn't work with units
- image doesn't work with units HOT 1
- ecdfplot does not honor attributes
- Poor performance when drawing 900 lines in 3d HOT 7
- 3D Camera glitches with WGLMakie, not with GLMakie HOT 4
- Wrap tutorial doesn't work anymore HOT 10
- Formatting.jl is causing warnings when installing HOT 3
- Regression - `hist(data; alpha = 0.5)` stopped working
- Unable to pass attributes if re-directed by recipe HOT 2
- Clean install of CairoMakie#master will does not compile on Ubuntu 22.04.4 LTS HOT 2
- Lines plot artifacts with GLMakie v0.10.2 on julia 1.10.3 (win10) HOT 8
- Cutting planes (volumetric visualization) HOT 1
- Allow different line widths in contour HOT 2
- Invalid attribute strokewidth for plot type Wireframe, Makie v0.21.2
- GLMakie: `offset_bezierpath` ends in infinite recursive loop as a result of calling `scatter!`
- glDeleteTextures segfault
- WGLMakie+Pluto record/animation results in MethodError: no method matching wait_for_ready(::Nothing)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from makie.jl.