-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Document breaking changes in internal API #3436
Comments
It appears 6c2fe76 introduced another breaking change to Before 6c2fe76: library(ggplot2)
p <- ggplot(iris) +
geom_point(aes(x = Petal.Width, y = Sepal.Length, color = Species)) +
scale_x_continuous(breaks = seq(0,3,0.5), limits =c(0,3), labels = letters[1:7])
b <- ggplot_build(p)
b$layout$panel_params[[1]]$x.major [1] 0.04545455 0.19696970
[3] 0.34848485 0.50000000
[5] 0.65151515 0.80303030
[7] 0.95454545 After 6c2fe76: b$layout$panel_params[[1]]$x.major NULL |
Ahhh, it must be b$layout$panel_params[[1]]$x$break_positions() [1] 0.04545455 0.19696970
[3] 0.34848485 0.50000000
[5] 0.65151515 0.80303030
[7] 0.95454545 |
I think this is all part of @paleolimbot's refactoring of axes. The end result should be much cleaner and more maintainable, but there's going to be some pain transitioning. @paleolimbot It might be helpful if you could prepare a brief document explaining the key design choices and showing with simple examples how relevant information about the panels and axes can be extracted under your new system. This might fit into the (as of yet nonexistent) ggplot2 internal development vignette, or alternatively into the vignette on extending ggplot2. |
This pain could be significantly reduced if there was a "Breaking changes in internal API" section of the news that stated something like:
A vignette might be helpful in this particular case, but generally speaking, when these sort of changes are made, they should be documented in a simple and consistent fashion. |
@clauswilke is right, this is my fault! The overarching theme of my internship is formalizing the structure of the In the future |
Now that I think of it, if possible, it'd be great to have informative warning (instead of NEWS item) if you try to access these deprecated fields. |
We could do that if we make |
Just a note that now that #3398 is merged, there are a few more changes in the |
This release we documented changes to the internals in its own header and I think this is probably something we should keep doing in the future. |
At least a handful of pretty important packages (e.g., plotly, shiny, etc) rely on the data structure returned by
ggplot_build()
...it'd be really helpful to have a news note when these things change as well as a short statement on why they've changed.Since the latest CRAN release (3.2.0), I've noticed at least one change, have there been any others?
The text was updated successfully, but these errors were encountered: