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
2
votes
0 answers

Remove plotly highlight and dimming on hover when mouse exits plot

I would like to remove the highlight effect on selected data, and corresponding dimming effect on non-selected data, produced by hovering over data in a ggplotly object where plotly::highlight() has been used, but ONLY when the mouse exits the plot.…
ZekeMarshall
  • 131
  • 5
2
votes
0 answers

Any way to put a picture (.png) in a ggplotly tooltip?

Hi I've been adding onto an R Shiny project of mine and I've had a hard time finding information on working with ggplotly tooltips. I have a graph that plots NBA PPG vs shooting efficiency for the top scorers, and I have a basic tooltip set up…
jyablonski
  • 711
  • 1
  • 7
  • 17
2
votes
0 answers

Object sizes when zooming in on interactive plot generated with ggplotly

I am preparing an interactive graph using ggplotly in R, which can be represented by the following example: library(ggplot2) library(plotly) p <- ggplot(pressure, aes(x=temperature, y=pressure)) + geom_point() + geom_line() ggplotly(p) When you…
Yvlara
  • 33
  • 2
2
votes
1 answer

ggplotly and lubridate: Hoover shows seconds, not minutes

I created a boxplot with ggplot with the following data.frame: library(lubridate) library(ggplot2) library(ggplotly) df <- data.frame( time = c("00:43:20", "00:44:30","00:45:40"), sex = c("m","m","m") ) df$sex <- factor(df$sex) df$time <-…
J_F
  • 9,956
  • 2
  • 31
  • 55
2
votes
0 answers

log transformation doesn't work for 3d plot in plotly

I want to make a rotatable 3d plot. For now I'm using plotly. The following code works: require(plotly) fig <- plot_ly(mtcars, x = ~wt, y = ~hp, z = ~qsec, type="scatter3d", mode="markers") fig Now, I want to move one or more dimensions to log…
Vasily A
  • 8,256
  • 10
  • 42
  • 76
2
votes
0 answers

R: crosstalk + plotly: Heatmap not showing with filter_select input

I am trying to make an interactive graph with the select input made with crosstalk::filter_select(). However, the heat map seems to be empty when I select a group and I am not sure why. I have included the code to generate the heat map, some images…
Brendi-A
  • 113
  • 6
2
votes
1 answer

Dynamic height of shiny ggplotly plot

I have a ggplotly output based on geom_col() for which the number of bars varies significantly. I'd like to configure it so the spacing between bars (and therefore also the bar width) remains constant no matter how many bars there are, which means…
geotheory
  • 22,624
  • 29
  • 119
  • 196
2
votes
2 answers

Create a ggplotly object with a subtitle

I'm plotting a Scatterplot with ggplot() as follows: library(data.table) library(plotly) library(ggplot2) library(lubridate) dt.allData <- data.table(date = seq(as.Date('2020-01-01'), by = '1 day', length.out = 365), DE =…
MikiK
  • 398
  • 6
  • 19
2
votes
1 answer

How do I make a violin plot with ggplotly?

I'd like to make a violin plot in plotly based on a violin plot in ggplot. I looked at this similar question, but my use case is different since I'm not getting the same warning. Right now, it's just showing a horizontal line without the boxplot or…
tadon11Aaa
  • 400
  • 2
  • 11
2
votes
1 answer

Why does R behave differently when parsing parameters of plotting?

I am attempting to plot multiple time series variables on a single line chart using ggplot. I am using a data.frame which contains n time series variables, and a column of time periods. Essentially, I want to loop through the data.frame, and add…
Kayla
  • 23
  • 4
2
votes
0 answers

Creating an interactive choropleth map using Plotly (R)

I've scoured the internet for my first attempt at creating an interactive map and I've hit a wall. I'm in no way married to this way of creating an interactive map, so if anyone has any other tried and true method that doesn't use plotly, I would…
2
votes
1 answer

plotly and ggplot legend order interaction

I have multiple graphs that I am plotting with ggplot and then sending to plotly. I set the legend order based the most recent date, so that one can easily interpret the graphs. Everything works great in generating the ggplot, but once I send it…
Arik124
  • 21
  • 1
2
votes
1 answer

HEATMAP/GGPLOT R

I am trying to create competency level heatmap for a manufacturing plant.I have tried both the HEATMAP as well as GGPLOT. I have couple of questions when it comes to using GGPLOT- here is the sample data. I am still not sure which will yield me the…
Neo
  • 67
  • 5
2
votes
0 answers

Is it possible to change color backgrounds in time lapse with gganimate?

I'm trying to do a scatterplot similar to this one with gganimate in R: But I can't find any function to do what the legend in the plot added before does. Does anyone know how can I do a legend similar to that one? The time runs in the legend bar…
Mireia
  • 21
  • 4
2
votes
0 answers

Trying to download PDF using RMarkdown in a Shiny App

I am trying to generate a report in PDF out of a Shiny App. I have two issues: Report not downloading in PDF, just HTML. How do I download it on PDF? Report not showing what was rendered (ggplotly image in this case), just showing text. How do I…
user284437
  • 129
  • 5