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

Display boolean value in ggplot/plotly legend instead of number

I am creating a shiny app which displays a volcano plot created with ggplot. For added user interactivity, I started experimenting with plotly. The original ggplot is provided by another package, so I use ggplotly to convert this plot to plotly.…
Jorge
  • 66
  • 1
  • 9
0
votes
1 answer

R Plotly Map, Hover Text reading from 2 data frames

I currently have a map that has plotted sites from 2 different data frames. I have red dots for one set and blue dots for another set. I can get the hover text to read from one of the data frames but how do i get it to read from another when…
0
votes
1 answer

ggplot : Hide geom_ribbon by default to my plot

I have this plot : g.mean <- ggplot(df,aes(x = as.numeric(xx),y=yy,color=varc)) + geom_line() + geom_ribbon(aes(ymin=Born_Inf, ymax=Born_Sup, fill=varc), alpha=0.1) Is there a way to hide only geom_ribbon() and print geom_line() to my…
Cox Tox
  • 661
  • 3
  • 8
  • 22
0
votes
0 answers

ggplotly does not respect any calls to remove grid lines

I'm trying to use ggplotly() with ggplot() to create a faceted graph without gridlines, like this: library(ggplot2) library(plotly) p <- iris %>% ggplot(aes(Sepal.Length, Sepal.Width, color = Species)) + geom_point() + facet_wrap(~Species)…
Nova
  • 5,423
  • 2
  • 42
  • 62
0
votes
0 answers

how to get data from selected portion of pie in plotly

please have a look I want to get the data from a selected portion of pie suppose i select the blue portion as in figure so i get the data from that portion i.e. February shinyServer(function(input, output, session) { usvltdyearstore1 =…
Rohit Jha
  • 11
  • 5
0
votes
1 answer

Spikes (droplines) only turn up in first facet in ggplotly

When I plot a facet_wrap() and put droplines to the x-axis, they only turn up in the first facet. Have I done something wrong or is this a bug? MWE: library(plotly) library(ggplot2) gg<-ggplot(data = iris, aes(x = Sepal.Length, y…
Gordon McDonald
  • 269
  • 2
  • 12
0
votes
0 answers

Plotly Scatter Plot: Symbol disrupts the colorscale and categorical x-y positions

I'm creating a unique type of categorical scatter plot with plotly in R, where: color is indicated by a continuous numeric variable size is indicated by a continuous numeric symbol is indicated by a categorical both axis are categorical…
0
votes
1 answer

R ggplotly producing correct plot, but when moving to plot.ly, x-axis is different

Producing a plotly object using ggplotly returns exactly what I need, however, when using api_create() and pushing the object to plotly online, the x-axis appears as numeric, and not a factor as I declared it to be in R. mem$Office <-…
JDots
  • 45
  • 1
  • 7
0
votes
2 answers

plotly: possible to make only certain graphical objects interactive?

I have a ggplot I'd like to turn interactive. However, I don't want ALL of the objects to be interactive as some are actually made to serve as a kind of background drawing (in this case, rows of greenhouse plants). The data in the squares on top of…
Tingolfin
  • 825
  • 8
  • 28
0
votes
1 answer

Issue with "na" in arranging the bars in a bar plot in R and ggplot2

I am trying to create a Descending bars bar plot using ggplot2 and plotly in R. The data I am using is "a12" which is consumed by the ggplot under the line "#Final Data frame is consumed below". If you see the snap shot below, the "na" value in the…
Robert J
  • 79
  • 6
0
votes
1 answer

Displaying the value of bar created in R using shiny and plotly

If you run the R shiny script below, we get two boxes in a dashboard, the left box has a bar chart and right has a DT table, when I click on any bar of the chart using event_data("plotly_click"), I want the corresponding Employee to be displayed in…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
0
votes
1 answer

Removing unnecessary labels in the tooptip in R and ggplot2 chart

Upon running the R and ggplot2 script below, the following snapshot is generated. Upon hovering on any box, we get the following tooltip as shown in the plot. My simple requirement is to get rid of the fourth tooltip attribute as it is similar to…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
0
votes
1 answer

Creating a horizontal bar chart in R to display sequence of activities

The dataset "patients" is an eventlog of patients visiting a clinic and getting treatment. The script below gives a data frame with traces or sequence of activities in the eventlog, trace_id and absolute frequency of the cases following the…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
0
votes
1 answer

Creating a dynamic chart displaying sequences of activities with their count in R

If you run the R script below, the dataset "patients" is an eventlog of patients visiting a clinic and getting treatment. The trace explorer gets created as in the snapshot below with the tooltip displayed. Now in the "#Script for Frequency…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
0
votes
0 answers

shiny R ggplotly Gantt chart configuration

I implemented ggplotly gantt chart, I need to do some changes i.e below: for ggplot y axis we want labels inside plot and at the end of every gantt bar, i tried using label parameter, but issue was because of long x axis period not seems whole name…