Questions tagged [ggplotly]

ggplotly is a function which converts a ggplot object into an interactive plotly object. It enables the usage of functions like zoom, hover, playing with the axis, appearing/disappearing group of points.

For more information and examples, please visit the website.

799 questions
0
votes
1 answer

How to use a numeric input to control where a vertical line is plotted over my histogram?

so I have a histogram, but I want to add either a scalarbar or textinput box so that a vertical line will appear at the designated frequency. I'm not sure how to do this. I've tried using abline but I get an error saying the plot hasn't been…
handavidbang
  • 593
  • 1
  • 6
  • 19
0
votes
1 answer

How do I get the ggplot objects back from an arrangeGrob object

I have a function that returns an arrangeGrob. I would like the access the individual ggplot objects to make them an input to say ggplotly. I tried looking at the structure of the arrangeGrob object, but there doesn't seem that there is a way to get…
Courvoisier
  • 904
  • 12
  • 26
0
votes
0 answers

Converting ggplot2 with ggplotly: packages error

I've been building a small scatterplot map in ggplot2 to post in a shiny app and it went ok, but I want to try and make it interactive, for example to see the values of each point and be able to resize the map as desired. I am seeing that there is a…
cartita
  • 31
  • 9
0
votes
1 answer

Rescaling of y axis on an interactive plot depending on zoom

I have an interactive plot on rshiny and I would like the axes to scale dynamically depending on where user zoomed. I think I can use scale_y_continuous for that using dynamic elements for ylim, however then I need to know the lower and upper y…
ozgeneral
  • 6,079
  • 2
  • 30
  • 45
0
votes
0 answers

How can we use the custom images in ggplotly to represent a point?

For example, using the longley dataset in R, we can plot using p <- ggplot(longley , aes(Year, Population, frame = Year)) + geom_point() To animate it we can use Out <- ggplotly(p, height = 600, width = 600) %>% animation_opts(frame = 1120,…
T.J.
  • 11
  • 1
  • 4
0
votes
1 answer

Fill color of geom_rect with Plotly and Webgl

I am trying to create a plot in R with rectangles using ggplot2 with geom_rect() and converting to plotly with ggplotly. Also, because of my data size I would benefit from the webgl version of plotly. The problem is when I convert my plot using the…
Lucas Nesi
  • 383
  • 2
  • 13
0
votes
0 answers

R ggplotly Header Area Not Uniform

I have a ggplot with facet_wrap of about 22 different plots. I'm trying to make them interactive using ggplotly, but for some reason certain rows of plots have their header area get larger to the point where I barely see the graph. It looks like…
PVic
  • 417
  • 1
  • 4
  • 13
0
votes
1 answer

Error in filter_imp when passing input from Shiny to plotly using dplyr

I'm working on a Shiny app and am having trouble understanding an error. I have created a much simpler reproducible example below that captures the issue. Ultimately, I just want to pass the input from the city selection box to dplyr::filter(). I…
buchmayne
  • 144
  • 1
  • 15
0
votes
0 answers

labels order by month name chronically in r plotly

I want to arrange in chronically order by month name but it is always shown according to highest value (like it should be January, February, March, April) but it is(January, March, February, April) (according to highest…
Rohit Jha
  • 11
  • 5
0
votes
0 answers

Interactive plot R within dplyr ggplot plotly

I'd like to create an interactive chart based on a dplyr pipe that I've created. I'm not entirely sure if this is doable but would be pretty amazing if it worked. Here's the code. I'd basically like to have a drop down menu where I can filter the…
Tom O
  • 1,497
  • 3
  • 13
  • 16
0
votes
1 answer

How can I visualize actual dates from ggplotly() graphs in R instead of numeric-transformed ones?

I want to visualize actual dates format instead of numbers (transformed by default) using ggplotly graphs when I put the cursor over the data points. Thanks in advance! Here is a simple example: require(plotly) require(ggplot2) x <-…
0
votes
1 answer

Show two bar plots with geom points and single legend using subplots in r

I want to show two bar plots with geom points on it using subplots. my code - df_1 <- iris[,c("Species", "Petal.Length","Petal.Width")] df_2 <- iris[,c("Species", "Sepal.Length","Sepal.Width")] df_1["Condition_1"] <- "P…
0
votes
0 answers

R: ggplot, plotly and auto-adjust of a Stacked bar plot

I'm facing this problem with ggplot2 and plotly packages with R. I'm creating a stacked bar chart, and, first of all, my data: # here my data family <- c('one','one','one','one','one','one','one','one', …
s__
  • 9,270
  • 3
  • 27
  • 45
0
votes
1 answer

number instead of date on the density plot in R

I have a problem. I am trying to draw a density plot in R with the plotly package. But when I hover the mouse over the plot I get number format of date 17623 instead 2018-04-02. Any ideas how to solve this problem? Date <-…
tomsu
  • 371
  • 2
  • 16