Questions tagged [ggiraph]

Use this tag for questions relating to ggiraph, an htmlwidget and a ggplot2 extension that allows ggplot graphics to be animated.

ggiraph is an htmlwidget to make ggplot graphics interactive. Further information can be found at ggiraph GitHub and CRAN.

89 questions
1
vote
0 answers

Maintaining interactive features of ggiraph when using knitR to convert to HTML

I am trying to get an interactive plot whereby a mouse hover indicates the ID of each point so that it can be identified. id <- c(1,2,3) lat <- c(51,52,52) lon <- c(0.1,1,-2) coord <- data.frame(id, lat, lon) library(ggiraph) library(ggplot2) UK…
1
vote
0 answers

embed animation plots generated by in a Markdown or html file outside Rmd and shiny

I have searched several R animation packages, such as, htmlwidget ggiraph plotly All packages can be used for Rmd and shiny. But I want to put the animated graphs on my hexo blog or other websites created from scratch by myself. (Hexo is a…
Stella Hu
  • 353
  • 5
  • 9
1
vote
1 answer

ggiraph htmlwidgets with bookdown and new_session = yes

This seems related to to rstudio/bookdown#15 but I haven't been able to figure pin it down. The example is here but the offending code is p2 <- ggplot(mtcars, aes(x = disp, y = mpg)) + geom_point_interactive(aes(tooltip = car)) ggiraph(code =…
topepo
  • 13,534
  • 3
  • 39
  • 52
1
vote
0 answers

Changing default tooltip for boxplot outliers in ggiraph

In geom_boxplot of ggiraph by default the values are shown in tooltip for outliers. Is there a way to modify the tooltip for the outliers? We can change the tooltip for the plot using tooltip parameter. Is there a parameter to change the tooltip for…
SBista
  • 7,479
  • 1
  • 27
  • 58
1
vote
1 answer

Tooltip missing for geom_line_interactive in ggiraph

I wanted to add tooltip to ggsurvplot. I am using ggiraph to display the plot. Since ggiraph does not have geom_step_interactive, I am manipulating my the data output of ggsurvplot to get the step function values and using geom_line_interactive to…
SBista
  • 7,479
  • 1
  • 27
  • 58
1
vote
2 answers

Order of stacked bar charts differ between ggplot2 and ggiraph

I'm building a shiny app that prepares a stacked bar chart with a tooltip showing levels of satisfactions across 3 items and 2 types of respondents. Here's the data that makes up the chart: mydf <- structure(list(Resp = structure(c(1L, 1L, 2L, 1L,…
Phil
  • 7,287
  • 3
  • 36
  • 66
1
vote
1 answer

Error while adding tooltip to ggsurvplot using ggsurvplot

I am trying to add tooltip to a ggsurvplot. I am using ggiraph to display the plot. I have added a minimal example of what I am trying to do below. If I don't add any xlim in ggsurvplot my code seems to work. The following is the code that…
SBista
  • 7,479
  • 1
  • 27
  • 58
0
votes
1 answer

Adding an image in tooltip of ggRadar

Goal I want to display images based on a column containing local/external url of images in a radar chart. Reproducible Example This is possible for a bar chart with ggiraph as shown below: require(ggplot2) require(ggiraph) require(ggiraphExtra) #…
umair durrani
  • 5,597
  • 8
  • 45
  • 85
0
votes
1 answer

geom_dotplot_interactive() removes stacking of points

geom_dotplot_interactive() allows to create an interactive dotplot with the package ggiraph library(dplyr) library(ggplot2) library(ggiraph) p <- iris %>% ggplot(aes(x = Sepal.Length)) + geom_dotplot_interactive() girafe(ggobj = p) However, as…
retodomax
  • 434
  • 3
  • 14
0
votes
1 answer

Interactive hover effects of adjacent giraffe graphs not synced when using patchwork

I try to reorder drv and class in mpg data, and then plot the boxplots of hwy with those two character variables as fill argument in aes of the ggplot. I use giraffe for that. But when I put the graphs together the hover effect not works properly. I…
rez
  • 290
  • 2
  • 12
0
votes
0 answers

ggiraph for ridgeline plot with trace?

I'm trying to do a ridgeline plot in R, such as this one from the Introduction to ggridges: However, I also want hover interactivity tracing the (x,y)-values (and potentially some more characteristics). The problem: Plotly have not implemented…
SimonSimon
  • 47
  • 6
0
votes
0 answers

Map plot won't show in Shiny app, no error shown

I am fairly new to R Shiny and I've been working on an app with an interactive world map which shows each country's performance at the Olympics, using scale_fill_gradient. The app user gets to choose the performance indicator (total medals won, gold…
fmoddy
  • 3
  • 2
0
votes
1 answer

ggiraph plot not rendering on Quarto (RStudio viewer)

I have made a plot with an interactive annotation; this works in RStudio in the viewer tab when I run this code: library(ggiraph) library(tidyverse) data(iris) graph <- iris %>% ggplot(aes(x = Sepal.Length, y = Sepal.Width)) + geom_point() + …
0
votes
0 answers

ggiraph Hover "Misaligned" in Latest Version?

Since updating my packages, I've been getting strange behavior when hovering over lines created by geom_line_interactive(). Lines get the hover effect even when the mouse is far from the line, and sometimes the line won't get the hover effect when…
0
votes
0 answers

How do you use the 'use_stroke' argument in ggiraph

I'm trying to create a ggiraph animated graph which uses the color of a point as the color of the border of a tooltip. The example here https://davidgohel.github.io/ggiraph/articles/offcran/examples.html shows using the Use_fill argument to change…
Tom H
  • 3
  • 2