867 questions
2 votes
1 answer
116 views
R plotly + crosstalk: filtering multiple datasets on a single ggplotly plot
I'm trying to use the R packages crosstalk and plotly (along with tidyverse packages) to create a panels that displays multiple data sets together. There's two data frames that I want to put into one ...
1 vote
0 answers
45 views
Data disappears when ggplotly uses a frame aesthetic that is a factor whose first level is empty. Is this a known bug?
My goal here is to raise awareness of a likely bug in R's (very useful) plotly package: Plots can be animated by setting the frame aesthetic in ggplot() (see Animating Views) then sending the ...
4 votes
1 answer
134 views
Why is editing the panel.border not working inside ggplotly wrapper?
I have been working on a shiny app for some time, last week I updated all of my packages when I downloaded a new version of RStudio. All of a sudden, existing shiny themes will work outside of ...
4 votes
2 answers
179 views
"X Unified" Hovermode and Show X Value
I'm working on a project using ggplotly() and am having trouble formatting my hover text. Specifically, I'm using the text aesthetic to format my tooltip, which works great. The problem I'm running ...
1 vote
1 answer
169 views
Spaghetti plots legend
I was trying to build a spaghetti plot: I have longitudinal data for several ID, and, due to some functionalities such has dropdown menus and legend filters, I decided to use plotly instead of ggplot2....
3 votes
1 answer
112 views
Unable to zoom or hover map using nested subplot()
My interactive dashboard where multiple Plotly objects including maps are displayed using nested subplot() in R: library(digest) library(sf) library(jsonlite) library(plotly) library(ggplot2) library(...
1 vote
0 answers
71 views
Reduce file size of multiple ggplotly graphs
I'm creating a document with a lot of ggplotly objects. This returns in a big file size. Apparently we could use the partial_bundle function to reduce the file size of plotly object. Unfortunately ...
0 votes
1 answer
82 views
How to programmatically generate plotly (or ggplotly) charts inside Quarto using loops or functions?
I'm trying to create multiple plotly charts inside a Quarto panel-tabset using a loop or function, but the charts either don't render at all or appear outside the tabset structure. Here's my code: --- ...
1 vote
1 answer
126 views
Ggplotly doesn't work in asis result Quarto
I'm trying to use ggplotly in a nested tab construction in Quarto from one of my previous questions, Nested tabs in Quarto document. Somehow when we use ggplotly the plot does not show op in the ...
2 votes
1 answer
133 views
How can I get the same plot between ggplot and ggplotly using geom_bin_2d() in R?
I want to output a 2-dimensional heatmap using ggplotly so that I can check their values by hovering the mouse over them. I entered the following sample dataframe and commands with geom_bin_2d() to ...
1 vote
1 answer
120 views
ggplotly hover on map area with a text different from the fill option
I am trying to create a simple map using ggplotly: I want only the western european regions to be coloured in green, and to do this I have created the binary variable weur. library(rnaturalearth) ...
1 vote
2 answers
84 views
how to handle long labels in facets when using ggplotly
I have problem using ggplotly with facets, subplot is a pain to use. Consider the following graph : library(ggplot2) library(dplyr) g <- diamonds %>% sample_n(1000) %>% mutate(cut = as....
1 vote
1 answer
78 views
plotly_hover does not match data in shiny when using color aesthetic in the plot
I'm having an issue with plotly_hover option when trying to display information from the hover in another output in a shiny app. I'm working with a plotly made from a ggplot that uses color aesthetic. ...
0 votes
1 answer
51 views
ggplotly joining lines with two different shapes
I have the following example dataframe that I am trying to create a plotly with, it was working until I defined the shapes to be different df <- tibble::tibble( Year = c("2018", "...
5 votes
2 answers
164 views
ggplotly - only show the top whisker of an errorbar
I have a ggplot barplot with an errorbar, which I'm putting through ggplotly. My preference is to only show the top of the errorbar. In ggplot2, I simply specify the y_min of the errorbar to be the ...