-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Add how to for Makie extensions #3779
base: master
Are you sure you want to change the base?
Conversation
It looks like you don't use the |
@jkrumbiegel approve CI? |
@jkrumbiegel @SimonDanisch approve and merge or request changes? |
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.
Thanks for the effort! In general nicely written etc. I just don't really like the example. Of course you can overload heatmap
like any other function, but these plotting functions are not your usual functions, they are rather entry points into our recipe/theming/plotting system. Which is circumvented by defining methods on them manually. I know you can technically do it, and I know that we don't yet have the canonical solution for that in Makie, but it's still not something the official docs should endorse.
I think I'd rather show how some recipe functions owned by the package can be filled in using an extension. So you define someplot
and someplot!
as empty functions in the package and add a recipe on top of that in the extension, like I was doing here https://github.com/jkrumbiegel/MakiePkgExtTest/blob/master/SomePackage/ext/MakieExtension.jl
Sorry I don't get this. You'd rather have packages that want a Makie extension not to use the Makie function like As I said, I thought this would be helpful for other package developers to have some documentation of how to write a Makie extension, but if you'd like to establish another way of writing such extensions then please let me know / change this pull request so that we know how to do it the preferred way + outlining the reasons for it, because I still haven't understood yet what the advantages are to hook into the deeper Makie logic than to extend a top-level function with another method. |
I don't know what the best solution is, the problem is that all the plotting functions defined through From my point of view it's better currently to define a simple function if you want to do a full figure with lots of stuff going on. Or a I acknowledge that this is happening because we currently don't have a "complex recipe" story in Makie, as it's a complex design issue, and people are going ahead with their custom solutions because they don't have time to wait. That doesn't make the problem I described above go away. |
following discussion in SpeedyWeather/SpeedyWeather.jl#511
@SimonDanisch @jkrumbiegel I've added a how to page on Makie extensions. Hope you find it useful. Feel free to change it as you see fit for your documentation. Also I can't see (or don't know where to look for) the link to the docs preview, if you could post it that'd be fab then I'll have a last look.