Closed sethaxen closed 1 month ago
FWIW, this comes up for me a lot. I guess I would hope that unused kwargs passed to a plotting recipe would just be ignored, but if they're arrays, symbols, Automatic
or a few other things, it seems to raise these errors, so where recipes have kwargs that map to different plotting functions called internally, I often need to manually divide them out.
This error is specific to the GLMakie backend, which tries to convert all attributes. Per our last discussion, at least, this is intentional.
Would you like a Theme(attrs, plot, ::PlotType)
function you can call to remove all attributes which are not in the default theme of that plot type, and merge in defaults as necessary?
Would you like a
Theme(attrs, plot, ::PlotType)
function you can call to remove all attributes which are not in the default theme of that plot type, and merge in defaults as necessary?
What would attrs
do in this function?
attrs
is the set of attributes you want to filter.
I guess what I would like to do is, given my plot MyPlot
and another plot type BasePlot
, get all attributes of MyPlot
that are also attributes of BasePlot
(implicitly removing the rest). Is that what you mean?
What I'm concerned about and what I speculate has happened here with scatterlines
is that someone creates a recipe whose theme uses the default_theme
for other plots and everything works. But then someone adds a new theme attribute to one of those plots, and now this user's recipe doesn't work anymore. It just makes recipes harder to maintain. I don't know what the solution is.
I've encountered the same problem with QQPlot
recipe (which is being ported in https://github.com/JuliaPlots/AbstractPlotting.jl/pull/478). I'm also not sure what would be a good solution.
This has been fixed
Seems to be that
lines
doesn't like theCircle
marker being passed to it.marker=:circle
is no better though: