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

Shiny: Background picture for ggplot

I produced a ggplot with a png as background. Local this workspace without a problem. But as a shiny the plot is not…
iPasc
  • 1
  • 1
0
votes
1 answer

How can i plot multiple plots with plotly

I do have a plot_list with almost 300 plots. Is there a way to plot all the plots from the array with plotly? I don't know how to create a subplot with so many plots. Here is my code: plot_list = list() for(i in…
Charles1
  • 57
  • 8
0
votes
1 answer

ggplotly does not plot geom_ribbon correctly

Im having problems when I transform a ggplot plot to a plotly object in the geom_ribbon. [this is what I get after using ggplotly][1] This is what i want to get after using ggplotly Here is my code: geom_line(aes(y=fitted),linetype=2,size=1) + …
0
votes
2 answers

Wrap axis label when using ggplotly()

I am trying to create a horizontal bar chart using ggplotly(). Because the labels are rather long I inserted HTML line breaks
. When plotting the data using ggplotly() the label is indeed wrapped but there is big margin to the left of the label…
Thomas Neitmann
  • 2,552
  • 1
  • 16
  • 31
0
votes
0 answers

Plotly R with ggplot2: Use coord_polar in a geom_bar using plotly

Is there a simple way of using coord_polar() when doing a barplot in ggplot2 using plotly? Example without using polar coordinates - It works One could also add +coord_flip() and this would still work. library(ggplot2) library(plotly) # Create fake…
Euler_Salter
  • 3,271
  • 8
  • 33
  • 74
0
votes
1 answer

Stacked horizontal barchart plotly

I am trying to make a horizontal bar chart using plotly using the following data: This is the code I have tried to create so far, but I'm not sure how to do the rest or if I'm doing it right: data <- data.frame(Answer = c("Have more than enough…
Raisham
  • 47
  • 6
0
votes
1 answer

Bar plots render incorrectly when translating static ggplot2 graphs to interactive ggplotly graphs

I would like to add interactivity to plots I've created in ggplot2. For 3 out of 4 horizontal bar plots I've created, this works fine when I wrap a plotting function in ggplotly(). However, for the last one, the plot reneders incorrectly and plots a…
Cari
  • 67
  • 5
0
votes
1 answer

plotting points with 3 dimension in 3s plots using ggplots package

I have generated a data with 3 columns and these data points correspond to 3 different clusters that is shown at the 4th column. I would like to plot these points on a 3d plot where each class A,B,C is shown with a specific color. here is the…
say.ff
  • 373
  • 1
  • 7
  • 21
0
votes
1 answer

Add trendline data to Shiny Plotly on hover

I'm creating a plot using ggplotly() and I'd like the Spearman's rank correlation [I'm storing here as the reactive value rho] to appear when hovering over the line created with geom_smooth. I found an article on the plotly website for doing this in…
MayaGans
  • 1,815
  • 9
  • 30
0
votes
1 answer

Add hover text to boxplot in plolty using R

I´ve gone thourgh some exemples but couldn´t fix the hover text Here is a minimal exemple: library(ggplot2) library(plotly) newhovertext=paste0(iris$Species,"
",iris$Sepal.Width) g <- ggplot(iris,aes(x=Species,y=Sepal.Width,label=newhovertext))…
david
  • 805
  • 1
  • 9
  • 21
0
votes
1 answer

Shiny app: Download data source outside of renderPlot for quicker user manipulation

This is my first shiny app. I would like for the user to be able to update the number of facet columns and the dimensions of downloaded plot. readNWISuv, the function to download data can take a long time if multiple years are queried. Currently,…
Srizza
  • 105
  • 6
0
votes
0 answers

Plotly+ggplot() in R causing strange lines to appear on initial play

I am having a strange issue in ggplot with strange lines appearing on the initial play of my animation (in viewer and saved to HTML page through Rstudio). I do not know what could be causing this, and have been stuck on this for multiple days. After…
nikv
  • 11
  • 3
0
votes
1 answer

Unable to plot heat map

library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union Apartment_no <-…
0
votes
1 answer

Move plotlyOutput() to the server side in a shiny app

I have a shiny dashboard in which I want to dynamically adapt both the graph and box height by using .js. The issue is that this happens only when I pass height argument inside plotlyOutput() and give it the input$GetScreenHeight which contains the…
firmo23
  • 7,490
  • 2
  • 38
  • 114
0
votes
1 answer

Adding text labels over barplot with ggplotly in R

I have the following dataframe in R DF_1<-data.frame("ID"=c("A_1", "A_2"), 'Sum'= c(2500,12500), "RR"= c(95,95), "CC"= c(50,50), "nn"=c(4,4), "DP"= c(12.5,100)) I have created the following barplot with text written in the barplot as follows …
Raghavan vmvs
  • 1,213
  • 1
  • 10
  • 29