PlotSpec interface, and changing types in convert_arguments #4218
asinghvi17
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider the following MWE:
Right now, returning a PlotSpec from convert_arguments simply converts the plot directly, i.e., only the PlotSpec is plotted.
I would propose that the plot should be encapsulated in the original plot type, thus allowing us to change the plotspecs dynamically. That would allow text layouts to simply be argument conversions, and the linesegment etc treatment would not have to be built into the text
plot!
method, but rather returned asPlotSpec
fromconvert_arguments
with definedused_attributes
. Seems like a pretty flexible method to me.If the order and type of the plotspecs are the same then they should not be replotted, if not then remove all old plots by empty!(p.plots) and replot them.
Essentially, PlotSpecs should be extremely flexible types which allow the user to replot at will. This would allow flexible recipes like DifferentialEquations.jl plots to be implemented easily and efficiently, as well as allowing for different methods of rendering text (latex as images, markdown, pango, etc). It would also allow us to consume Plots.jl recipes a lot more easily.
Beta Was this translation helpful? Give feedback.
All reactions