Comments (3)
I plan to have themes for recipes, so e.g. density
would have it's own theme node, which can be used to store information like label names. Would that solve one part of this?
For the macro, I would implement it as:
>macroexpand(@label plot(X, [Z, logistic.(Z)]); kw_args...) # with kw_args e.g. ylabel = "Owerwrite Z"
plot(X, [Z, logistic.(Z)], Scene(xlabel = "Z", ylabel = "logistic.(Z)"); kw_args...)
The plot will inherit attributes from Scene
, but they will still be overwriteable by the user (as pointed out in #10)!
Is this solving the issue completely, or would you argue that having _default_names
still needs to exist?
from makie.jl.
I think the Scene
idea solves the "overridable default" part, but there are two issues to keep in mind:
-
Figuring out which arguments are
x
ory
(the main issue being that in plotplot(x)
is the same asplot(1:length(x), x)
so thex
ends up on the y axis). If that method is not allowed in Makie, this should be solved -
In this example case, I would actually want:
@macroexpand @label plot(X, [Z, logistic.(Z)]); kw_args...)
plot(X, [Z, logistic.(Z)], xlabel = "Z", label = ["Z" "logistic.(Z)"]; kw_args...)
because the ylabel
is a vector and is better expressed as a legend:
If issue one is not a problem (that is to say, you don't need to know the plot type to know what goes on what axis), then it'd be sufficient to have a function create_label_scene(labels)
that creates the Scene
with the defaults, checking out whether the labels are symbols or vectors and deciding how to use them accordingly.
Anyway, I'll try to start porting the @df
macro as soon as I have a bit more time and I'll see where/how I get stuck. Is the recipe system still in flux or it is already safe to port things?
from makie.jl.
It's not really there yet! Still fighting with my refactor of scene creation, layouting and units...
I'll make a release with some demos once it's out!
Anyways, I think I first didn't understand your problem & solution correctly ;) I will think about this - if _default_names
is the best solution, I don't see why we shouldn't add it!
It could be a bit painful to add this _default_names keyword a posteriori so I thought I should mention it already.
This should be no problem. There is a single location in Makie, were one can add kw_args to every plotting function.
from makie.jl.
Related Issues (20)
- WGLMakie now throws an error if no screen available HOT 2
- Dead link in GLMakie/README.md HOT 2
- Deleting a plot removes listener HOT 2
- Zooming wireframe shows extra lines, regression Makie 0.19 -> 0.20 HOT 1
- Issues with h/vspan and h/hspan in log space HOT 3
- Last and first points of `lines` get interpolated when there is a lot of points (GLMakie) HOT 2
- Issue using scatter and line in 3d together with Vector{Union{Float64,Missing}} HOT 2
- `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 1
- Precompilation of CairoMakie fails HOT 3
- `limits!` hangs when being passed a an indexed Figure, not an Axis HOT 4
- Some recipes fail when plotting empty vectors HOT 3
- 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
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.