Questions tagged [gghighlight]

22 questions
0
votes
2 answers

Error when looping with lapply to add text with value from one column in a ggplot

I am following up my last question here because I got a bit greedy and I wanted to add something more to my plots so I decided I would create a new post. So to summarize I wanted to make several plots in a loop and someone suggested using lapply…
0
votes
1 answer

Loop to save same plot with different highlights using ggplot2

I would like to use ggplot to create multiple density plots that have the same data but that show a specific line highlighted. The table I have is extremely big but has the following columns: Marker Sample value X1 4_HVxLF 0.5 X2 4_HVxLF…
0
votes
0 answers

gghighlight highlighting lines with certain labels

I am trying to build a time-series plot and highlight certain lines based on the country that line belongs to. However, I couldn't find a way to highlight based on label names. I tried the following code, and although it worked, it also raised an…
0
votes
0 answers

Accessing the values of the reduced dataset after facet_grid in ggplot

Building on this earlier question, let's say the data table has columns ID,factor,SimulationID,Data. During the plotting, we want to plot a new graph. for each (factor, SimulationID) tuple using facet_grid(). And for each of these plots, we will use…
Our
  • 986
  • 12
  • 22
0
votes
1 answer

gghighlight creating extra points

gghighlight seems to be creating extra points when I highlight. Any tips here? I imagine I must be doing something wrong. library(tidyverse) library(gghighlight) mtcars<-mtcars #produces as expected ggplot(mtcars) + …
EconMatt
  • 339
  • 2
  • 7
0
votes
1 answer

Is there a way to have a highlighted chart as well as have interactivity of selecting elements in R?

I have come across a beautiful chart on this webpage: https://ourworldindata.org/coronavirus and interested to know if we can build the same chart in R with functionality of having highlighted series as well as selecting any line on hovering ? I…
ViSa
  • 1,563
  • 8
  • 30
0
votes
1 answer

How do you map dynamic colors in ggplot using a highlighter column?

I'm attempting to use a highlighter column and gghighlight to only show show selected cars (from the mtcars dataset) in a plot. I'd expect the colors to match the car that's being highlighted given they're in the same row but the colors get mixed…
Bryce
  • 33
  • 3
1
2