-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature request: coord_flip()
#39
Comments
A bit of frustrating news. As per: MakieOrg/AlgebraOfGraphics.jl#355
It seems more possible with base Makie, but they use at least two different attributes ( |
There are a lot of frustrating aspects to using AlgebraOfGraphics as the base of this package to be honest - I have considered seeing how difficult it would be to cut it out as a dependency and rely on Makie directly. I really like the interop idea, but I'm not sure how much support AoG is getting at this point, and a lot of its "quirks" are not documented to the extent that I would like .. to be fair, it does say in its description that it should be expected to break often |
@JasonPekos, thanks for the comments and for doing a bit of investigation into this! In general, we're trying to map TidierPlots to functionality within AlgebraOfGraphics, and in some cases may be able to wrap Makie directly. Will let @rdboyes weigh in on this when he has time, but please feel free to continue to open issues on any of our packages so we can continue to make them better! Edit: @rdboyes, you beat me to the reply! |
Found this issue while I researched a bit how TidierPlots.jl is set up. I think if you want to reimplement ggplot, relying on AoG is not a good idea. First of all, its maintainer currently doesn't have much time for it, but more importantly, I think it's just more complicated to get ggplot's features to work via AoGs API. AoG was created with the hope that it would be enough to map the positional args of Makie plots to a facetting / grouping engine. But this is not true, as many quirks with many different plotting functions show. For example, the horizontal / vertical thing, functions like
That's true, these keywords have grown a bit organically and have therefore not been assimilated across Makie. But as long as TidierPlots abstracts these away you shouldn't care. If you treat Makie as a relatively low-level drawing engine that is "stupid" and doesn't make assumptions about the data you plot, you'll have a better time I think. All the assumptions / semantics should come from this package, and because AoG defines very few on its own, I don't think it's a good intermediate. |
Thank you for this feedback, @jkrumbiegel. I think the original reason for relying on AoG is that the lift required to implement the intended TidierPlots interface from scratch using Makie seemed like too much, and we wanted to make sure this was a good idea before getting too deep in the weeds. Even now, the interface is functional to a large degree, though there are rough edges because of the reliance on AoG and subtle differences in the needs of TidierPlots from what is implemented in AoG. We are also working on package docs. I'll defer to @rdboyes on whether he has the bandwidth or desire to refactor this over time to more directly depend on Makie. I'd love to see it happen but feel our biggest problem is low adoption. I'm furiously working on a set of tutorials to accompany the Tidier family of packages (more coming soon at https://tidierorg.github.io/TidierCourse/), so my focus right now is in encouraging adoption. Appreciate you weighing in. |
I think my long term goal for the package is to rely directly on Makie rather than use AoG. The easiest way to do that (I think) will be to use the new Makie spec api introduced in Makie 0.20, but that API isn’t finalized/stable yet so I haven’t put a lot of time into “rewiring” tidierplots to use it. Once it’s finalized it should be relatively easy to convert |
The majority of the work to remove the AoG dependency is complete and the package is working (ish) without it! The 0.6 release will depend directly on Makie. The current version is in the branch https://github.com/TidierOrg/TidierPlots.jl/tree/makie-only . Many of the geoms are not working anymore right now, but I have geom_point working smoothly and getting the other ones to cooperate shouldn't be too bad |
Very cool! Do note though that the SpecApi is still experimental, so you might have more maintenance effort with it in the nearer future if we have to make changes to it. Just looping in @SimonDanisch here for awareness. |
I saw the warning and was trying to hold off on the rewrite, but inspiration struck :) Most of the code is unlikely to change too much even if the SpecApi changes slightly, since it is largely focused on capturing and translating ggplot lingo to Makie args. I'll keep an eye on it though! |
Back to the original ask - |
If it doesn't exist already, IMO it would be nice to have
coord_flip
in tidierplots.ggplot (R) reference: here.
I can take a look at creating a PR if there's any interest.
The text was updated successfully, but these errors were encountered: