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 grab selected event data from a ggplotly chart?

I'm aware of https://plot.ly/r/shinyapp-plotly-events/ and have been using it as a guide. But the ggplot element I'm converting to plotly is the output from the fviz_dend function of the factoextra package. Here's a minimum shiny app example I'm…
saheed
  • 340
  • 2
  • 12
0
votes
1 answer

Assign hline a different colour than other lines in the graph without using scale_colour_manual?

Fairly new to R so forgive me if this is a simple question. I have created a graph which tracks a loss ratio percentage by data provider. I assign the "data provider" lines colour using scale_colour_brewer 'blue'. In a previous iteration I had used…
0
votes
1 answer

ggplotly not working properly when number are facets are more

I am trying to create a Shiny Dashboard which contains Plots also. Plotly is such a great a package that it provides great visualization and interactivity to the users. But when i use ggplotly to convert my ggplot plots to interactive graphs, i am…
David Chris
  • 255
  • 4
  • 16
0
votes
1 answer

ggplotly cutting off rows from heatmap

Henlo internet. Having trouble with ggplotly rendering of a heatmap generated in ggplot2. It cuts off the first few lines of the plot for some reason. Here are the first few lines of the dataframe: Gene …
0
votes
1 answer

Change the font size of text annotation inside ggplotly object

I have the dataframe below: df <- data.frame(result=floor(rnorm(1000, 100, 20))) and I create a ggplotly histogram with an annotation. I would like to know how to change the font size inside…
firmo23
  • 7,490
  • 2
  • 38
  • 114
0
votes
0 answers

Create html5 interactive plot (plotly) from R using ggplot2 with facets

I can convert a plot created by ggplot2 easily via plotly::ggplotly() as follows: library(tidyverse) ggplot(as_tibble(iris), aes(x=Sepal.Width, y=Petal.Length, color=Species)) + geom_point() plotly::ggplotly() I expected the following to work such…
hyiltiz
  • 1,158
  • 14
  • 25
0
votes
0 answers

Visualization of missing/available data originating from different sources

Here’s the situation : I have 2 datasets containing the monthly prices of different financial products between 02/2013 and 09/2019 when they are available. These datasets have 47 observations (financial product IDs) and 80 variables (months).…
Romain Berrou
  • 27
  • 1
  • 7
0
votes
1 answer

How to display all durations of events per the events themselves with plotly in r

I would like to create a widget in rshiny displaying the duration of events using plotly. I have a df with 4 events and their starting and ending time. event =…
eyei
  • 402
  • 4
  • 12
0
votes
1 answer

How to change the x-values displayed in ggplot and ggplotly in R

I have a timeseries X, with related timestamps, and i want to provide a graph with the hourly values. The X-axis should not show the timestamp but rather the hour, however the plot should be generated with the timestamp as the x-axis I've already…
0
votes
0 answers

How to generate interactive "tableau style" heatmaps in R with two factors as axis labels

In tableau, it is relatively straight forward to create tables/heatmaps with labels from two columns. Consider the following data library(tidyverse) set_cols <- as_mapper( ~set_names(.x, c("brand", "model")) ) data <- mtcars[-6,] %>% …
Benjamin Schwetz
  • 624
  • 5
  • 17
0
votes
1 answer

ggplot stat_ecdf() with a Shiny reactive expression

I'm hoping to implement this ggplotly bug fix offered here: https://community.plot.ly/t/bug-with-ggplot2-stat-ecdf-function/1187/4 into a Shiny reactive expression. The top plot below shows the ggplot() call results within Shiny (as expected), the…
dbo
  • 1,174
  • 1
  • 11
  • 19
0
votes
1 answer

Using ggplotly with ggplot

I have a script using ggplotly to produce a couple of interactive charts. I then try to produce addition charts that are not interactive using ggplot. They refuse to plot even if I introduce Sys.sleep() pauses. Is there a reason why one cannot mix…
Ernie
  • 1,103
  • 1
  • 14
  • 25
0
votes
0 answers

ggplotly reactive graph is showing up on viewer panel in RStudio but not in shiny app

My interactive ggplot won't show up on my shiny app but will show up in RStudio and react to the changes from the shiny application. It was fine until I made the graph interactive and not sure why it has changed. server <- function(input, output)…
fitz22
  • 11
  • 5
0
votes
1 answer

Density Plot in R Highcharter

I am trying to plot similar density plot in highcharter R. I am pretty new to highcharter, any guidance will be really appreciated. dt <- data.frame(x=rnorm(1000),y=sample(c(0,1),size = 1000,replace = T)) library(ggplot2) ggplot(data = dt) + aes(x…
Rushabh Patel
  • 2,672
  • 13
  • 34
0
votes
1 answer

R ggplotly dublicated legend

I try to generate a plot on which every point stands for an event. Color, Size and faced_grid are used to give additional information available in a visual way. The graph is working in ggplot2 but it is often important to know the exact numbers so…
tryhard
  • 1
  • 2