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

Ggplot with label only returns NULL instead of plot

I have the following problem: I want to add labels to my points in a scatterplot created with ggplot2 and ggplotly. I have read several posts here how to do that with geom_text(). However, I always get a NULL return if I want to print my plot.…
sh_student
  • 369
  • 2
  • 14
0
votes
1 answer

Convert Venn diagram to grob?

Hi there are several ways to convert R base plots to grob object, however I can't seem to get venn diagrams from the VennDiagram package to do this. I tried two different methods but both failed. Any ideas? thanks! library ( VennDiagram…
Ahdee
  • 4,679
  • 4
  • 34
  • 58
0
votes
2 answers

How can I filter data from dropdown list?

I would like to filter state on my graph by dropdown list. For instance, I have density graph and dropdown of state list, when I change state graph should be changed as on state. However, with my code when I change the state, it has not something to…
user11524670
0
votes
1 answer

How do I use plotly events to filter data? event_register error message

I want to be able to double click on a category in a bar chart and filter all the data used in the graphs (currently 2) when I do so. I know how to do it without plotly, but since the Specialties bar chart has many categories, I need plotly to have…
Skywind555
  • 31
  • 1
  • 7
0
votes
1 answer

Plotly code - viewer graph doesn't showup

I am running the example code for the Slider function (example 2) in R:https://plot.ly/r/animations/ I want to simply reproduce the given example. However, the graph doesn't show up in my viewer. This is the codeI run in R: …
0
votes
1 answer

How to add errorbars for a bar plot in ggplot in R

I recently tried to add error bars to a bar plot I've created in ggplot in R. However, when I looked up geom_errorbar it appears that the only documented way to do so was to create another data frame that holds the ymin and ymax of each bar, and…
EyalItskovits
  • 116
  • 1
  • 9
0
votes
0 answers

How to add a slider to make points to appear or dissappear in time

I did a basic ggplot analysis in R on a dataset of gaze data. The plot shows how the gaze points are distributed in a coordinate system: I now want to add a simple slider that lets the points appear or dissappear in time. ifigured out that plotly…
0
votes
1 answer

Is there functionality in plotly to do something similar to hjust/vjust or position_dodge in R?

I'm hoping to adjust the location of points and lines in a dumbbell plot to separate the bars rather than overlaying them, similar to position dodge or hjust/vjust in R. The code below produces something close to what I'd like, but the barbells are…
0
votes
0 answers

Linking 2 time series charts in a single chart

I am trying to link two-time series graphs into one graph in R, as a facet grid or anything interactive. 1st graph: TT = ggplot(data = x1, aes(Date, Count_of_Fresh_emails)) + geom_line(aes(color = Country), size = 1) + …
0
votes
1 answer

ggplotly tooltip reacts erratically

I have this ggplotly object of NBA court showing the field goal attempts of each player. As you can see, when I hover over each region of the court, I see the tooltip behave very unpredictably. I feel like its because the court is produced with…
user8248672
0
votes
2 answers

R ggplotly with facet_wrap : axis tick size not changing for all plots

I need to use ggplotly to create the following plot using facet_wrap. All is ok, the only problem is that resizing the axis tick labels works only on the left plot! Any ideas how to fix this? I deliberately put a ridiculously small size to point out…
Parisa
  • 448
  • 5
  • 11
0
votes
1 answer

ggplotly in R : change data label size

I have to convert a ggplot to a plotly. Naturally, the easiest way to do so seems to be using ggploty, but the font size change. No problem to get back to the good size for axis labels and title, but I cannot figure how to do this for data labels?…
Parisa
  • 448
  • 5
  • 11
0
votes
0 answers

Label on each bar ggplot in R

I'm plotting the age of the participants from a survey i've made. To plot this barchart I'm using this code: plot_ly(y = dataIdade$total, x = dataIdade$Idade, name = "Idade", type = "bar") But as you guys can see, the label of X is displaying only…
0
votes
1 answer

Aes in ggplotly

ggplotly prints some stuff from aes, namely "alpha" and "Continent", I have no idea why it goes like this.. please help to remove it! Look at the upper right corner -> part of the code with ggplot: server <- function(input, output) { …
0
votes
1 answer

How to set default values to build a ggplot in shiny?

I've been trying to make my first shiny app using data from the World Happiness report. I wanted to make 2 tabs: Plot using reactive values Table using reactive values I almost succeeded except for.. when I run the code there's first an…