-
Notifications
You must be signed in to change notification settings - Fork 631
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
ggplot2 extension packages #566
Comments
I am working in the forecast package right now and would really like to use Plotly for my dashboard! I have found the following links really helpful for converting forecast to ggplot2 : Although I will admit I think there is a bug with the geom_ribbon function in plotly. I can plot the ggplot perfectly with my prediction band, but the ggplotly interpretation of the ggplot2 is converting my NA's for the observed values into values for the geom_ribbon |
can I just add a huge +1 for The ggrepel repel-optimisation of course, wouldn't be available in pure JS. Would be nice to have the repelled-labels resized/react to the size of the plots. |
I'm working on a hook for my fork of ggflags (which substitutes SVGs for the PNGs originally used). I'm trying to get my head around EDIT: also documenting as I work things out on Stack Overflow. Any expertise or guidance from people here would be appreciated, though! |
I don't think plotly.js has the ability to accept arbitrary SVG/PNG for marker definitions...you might be able to leverage marker color gradients, but I'm not immediately sure. Anyway, I remember having a look at ggflags and was thinking we could probably convert them in a similar way to |
Mmmm, I think I see how it works. The main problem I see is that |
Annotations are raster objects -- that's also true for geom_flag, correct? If so, the implementation would be very similar (which works for facets) |
In the case of my fork of |
Would be super awesome if geom_text_repel() would work with plotly since I mainly use plotly for plots totally crowded with text 👍 |
apparently ggjoy is deprecated in favor of ggridges |
will love to see ggraph implemented. about the comment: thanks in advance, and keep the awsome work :D ! |
Any chance |
Any chance |
would you implement gggenes with |
@cpsievert can you rank the geoms by importance so I can try implementing them sequentially. |
@moutikabdessabour here's some code to get weekly downloads over the past year for all the packages listed thus far. This pretty well reflects my priority list library(dplyr)
library(cranlogs)
library(plotly)
downloads <- cran_downloads(
package = c(
"ggraph", "ggforce", "ggrepel", "ggtern", "tidybayes", "ggtree", "ggpolypath", "geomnet", "ggjoy", "ggflags", "forecast", "survminer", "tidyquant", "ggtheme", "treemapify", "directlabels", "ggsurv", "ggimage", "statebins", "ggpubr", "corrr", "ggpmisc", "ggnewscale", "Ipaper", "qqplotr", "ggpmisc"
),
from = Sys.Date() - 365, to = Sys.Date() - 1
)
downloadsTransformed <- downloads %>%
mutate(count = zoo::rollapply(count, 7, sum, fill = NA))
plot_ly(downloadsTransformed, x = ~date, y = ~count, color = ~package) %>%
add_lines() %>%
config(displayModeBar = FALSE) %>%
layout(hovermode = "x", yaxis = list(title = "Number of downloads"), xaxis = list(title = "", rangeslider = list(visible = TRUE), rangeselector = list(buttons = list(list(count = 1, label = "1m", step = "month", stepmode = "backward"), list(count = 12, label = "1yr", step = "month", stepmode = "backward"), list(step = "all"))))) |
As said, ggjoy has been superseded by ggridges, so you should count them together. |
Can gggenomes be implemented in ggplotly? Thank you! |
When I try to use ggplotly(g1), where g1 is a ggplot using directlabels::geom_dl(), I get: and no labels on the ggplotly plot. Fully reported in but #1244 is closed... |
Extensions that we'd like
ggplotly()
to supportggpubr::stat_compare_means()
(and maybe others from https://github.com/kassambara/ggpubr?)GGally::ggcorr()
?ggpmisc::stat_poly_eq()
Can you implement geom_GeomTextNpc() in plotly ? #1921Extensions that
ggplotly()
currently supportsExtensions that we don't plan on working on anytime soon
Want to add an extension?
If any community members are interested in implementing a hook into
ggplotly()
for a custom geom, see https://cpsievert.github.io/plotly_book/translating-custom-ggplot2-geoms.htmlIf anyone would like to sponsor work on a specific geom/package, please get in touch.
The text was updated successfully, but these errors were encountered: