How to add two highlight layers using gghighlight

42 Views Asked by At

I'm trying to add 2 highlight points layers using gghighlight package. Here is the code:

p$sp <- p$sp +
  gghighlight(
    pw > quantile(pw.fpi$pw, 0.95),
    fst > quantile(pw.fpi$fst, 0.95)
  ) +
  geom_point(color = "blue", size = 1) +
  gghighlight(
    pw < quantile(pw.fpi$pw, 0.05),
    fst > quantile(pw.fpi$fst, 0.95)
  ) +
  geom_point(color = "green", size = 1)

However, only green points layer shows in the figure, blue highlight points were covered. Does anybody know what to do next? Thank you

I am expecting a figure with two highlight point regions, blue points and green points exist in the figure simultaneously.

0

There are 0 best solutions below