-
-
Notifications
You must be signed in to change notification settings - Fork 361
Closed
Labels
AttributesPlot, Block and Scene AttributesPlot, Block and Scene AttributesMakieBackend independent issues (Makie core)Backend independent issues (Makie core)enhancementFeature requests and enhancementsFeature requests and enhancementsmaybe outdated/fixedTODO: reviewTODO: reviewplanningFor discussion and planning developmentFor discussion and planning developmentplotRelated to plot objectRelated to plot object
Description
To break up #1085, I want to start changing the behaviour of getindex/getproperty, without getting into the huge refactor of also changing the planned internal implementation of the plot objects.
The plan is to, change plot.attribute_name to:
- return the fully converted value. So
p = plot!(..., color=:red); p.colorwill returnRGBAf(...). This will help to get rid of lots of Observable indirection and double conversions. p.color = :redwill still work and convert immediately- if one really needs an observable, one can call
observe(p, :color) - no
p[1]anymore.. We may want to keepp.args[1]for backward compatability, though - We may need
p.kw_argsto make it possible to access the plot attributes the way the kw arguments allow. E.g., I want to convert colormaps + colorrange to a new object, that will sit atplot.color(idea not yet final). So,p = plot!(..., color=x, colorrange=...); p.colorwill not returnxbut instead some kind of color sampler object, which can be annoying. So the proposal would be to allowp.kw_args.color == x; p.kw_args.color = new_x, which also opens up the possibility to allow for some magic keyword args.
This all will help a lot with type stability and getting rid of lots of Observable indirections, which are slow to compile and run.
It aims to also make the API cleaner and easier to work with.
eliascarv, BambOoxX and asinghvi17
Metadata
Metadata
Assignees
Labels
AttributesPlot, Block and Scene AttributesPlot, Block and Scene AttributesMakieBackend independent issues (Makie core)Backend independent issues (Makie core)enhancementFeature requests and enhancementsFeature requests and enhancementsmaybe outdated/fixedTODO: reviewTODO: reviewplanningFor discussion and planning developmentFor discussion and planning developmentplotRelated to plot objectRelated to plot object