Comments (3)
Most plotting functions should handle empty vectors. I can't formulate a perfect rule but usually if you can draw zero or more of something, then this should work for zero. But if there's some data transformation inherent to a recipe which just doesn't make sense for zero elements, then this should fail. Like sum(Float64[])
returns 0
but mean(Float64[])
returns NaN
because you can't divide by zero.
Often, problems with zero elements will stem from type instabilities breaking subsequent dispatches. For example, a vector will be assembled given the input data and this ends up Any[]
for the zero-element case because it couldn't be inferred what element type it should be. Then any following dispatch will probably fail if it expected Point2f
or so. These are often reasonably easy to fix by type-constraining the relevant containers.
from makie.jl.
@jkrumbiegel Yes, that is why I explicitely called concretely typed empty vectors, that avoids the dispatch problem I guess, at least partially.
from makie.jl.
Right but this is not just about the input types, the recipes themselves will sometimes do type-unstable transformations. But those can be fixed one by one. We should definitely increase the test coverage for empty recipes. If you want to tackle that, it would already be very helpful to assess which empty cases are already tested, and which aren't, and then adding tests (that are failing) for the missing cases. Then somebody else can go in and fix those.
from makie.jl.
Related Issues (20)
- `DataInspector` overcounts the point number in `stairs` plots (GLMakie) HOT 1
- `scatterlines` cannot pass a number as one colorant for the whole scatterline HOT 1
- Why are the heatmap rectangles not centered with the passed coordinates? HOT 1
- `linkaxes!` does not update correctly the axes limit when `yaxisposition=:right` is set.
- shading selection for custom recipes HOT 1
- Some triangles are not rendered
- Fit objects into scene after Makie transformations HOT 7
- Precompilation of CairoMakie fails HOT 3
- `limits!` hangs when being passed a an indexed Figure, not an Axis HOT 4
- student gets precompile error and access denied to `libcairo-2.dll` HOT 1
- bracket! does not work with vectors when not providing a text argument
- DataInspector does not work for lines in log10 scale HOT 3
- Fill polygon with a linear gradient
- `size(screen)` does not match `size` keyword arg passed in on Mac HOT 2
- Repetitive precompilation for GLMakie and GeoMakie since Julia 1.10.0 HOT 3
- GLMakie Precompiling Segmentation Fault in WSL2 HOT 1
- Right ticks of an Axis not updating correctly when adding a Colorbar
- PolarAxis ticklabel cannot take rich text
- zooming in on 3D plot to within axes causes object to be rendered outside the axes HOT 1
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.