-
-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic plot tests #4804
base: master
Are you sure you want to change the base?
Generic plot tests #4804
Conversation
Benchmark ResultsSHA: b46d5a95e733dfb0d2679b0b5ffd05e2a6ac914a Warning These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking. |
test/testplot.jl
Outdated
CT = Makie.conversion_trait(PlotType) | ||
f = Makie.MakieCore.plotfunc!(PlotType) | ||
|
||
if CT === PointBased() || PlotType <: Union{Makie.Text, ABLines, BarPlot, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this multiple dispatch based, maybe so it returns aplotspec that can be decomposed to args and kwargs and then plotted?
That way it's easy to extend as we get more recipes, or for external recipes we may want to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I guess multiple dispatch would be better if another library wants to reuse and extend the Code for testing. If it's just used here I don't think multiple dispatch matters much.
I'm not sure if PlotSpec is a good idea. It's calling to_value
on kwargs/attributes and I'd assume it circumvents parts of the normal plot pipeline. It should probably be tested separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, maybe just returning a tuple (; args, kwargs)
might work?
Description
I wanted to test that every plot correctly initializes and propagates
transformation
in #4792. I figured it would be good to do this in a more generalized way, so I worked on creating a function that produces a sample plot for everything we have. That should simplify writing tests a bit by making it easier to just get a plot for some random plot type.Currently tests that every plot works in a
Scene()
.Fixes h/vlines, h/vspan, ablines and datashader (?) not working in
Scene()
due toprojview_to_2d_limits
not working without aFloat32Convert
.Type of change
Delete options that do not apply:
Checklist