yutannihilation / gghighlight

Highlight points and lines in ggplot2
https://yutannihilation.github.io/gghighlight/
Other
522 stars 23 forks source link

The example is faulty #202

Closed alireza5969 closed 2 months ago

alireza5969 commented 2 months ago

The following example which is provided on the Introduction to gghighlight page is not correct:

ggplot(d) +
    geom_line(aes(idx, value, colour = type)) +
    gghighlight(max(value) > 20, label_params = list(linewidth = 10))

The linewidth parameter is for lines not for labels. Therefore, when you run the code, the following warning will be shown by R: Warning message: In geom(mapping, rightmost_points, linewidth = 10) : Ignoring unknown parameters: `linewidth`

yutannihilation commented 2 months ago

Thanks for letting me know! It was my mistake when I replaced some size to linewidth in the doc.