0

I'm plotting a geom_point() layer using ggplot. In my plot, I have one dot located very far away from the rest along the y axis. As a result, the data visualization loses granularity and displays a bunch of little dots close together, as well as a single isolated dot high and far away from the rest.

I do not want to exclude the outlier. Instead, I would like to break the y-axis coordinates, for instance displaying ylim = c(0, 220) followed by c(2000, 2100). However, I did not succeed using coord_cartesian or scale_y_continuous.

Anyone knows how can I make this works, or possibly suggest any alternative solutions? Thanks

4
  • 1
    I don't think it's possible to do so in ggplot by design. See here for further discussion & some possible alternatives. Commented Nov 18, 2017 at 13:42
  • Something from ggplot2-custom-grob-over-axis-lines might help. But it will not be easy. Commented Nov 18, 2017 at 21:16
  • Perhaps use ggforce::facet_zoom instead. Commented Nov 18, 2017 at 22:06
  • Thank you all. You took time to read and to answer to the question I had. I will solve this question. Be well Commented Nov 20, 2017 at 22:05

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.