on-internet
← Community

How to create a broken x-axis in ggplot2 with a single continuous panel border

Stack Overflow ·

I am using ggplot2 to create a scatter plot. I would like to introduce a break in the x-axis between 20 and 80 because this range does not need to be displayed. My desired output has the following characteristics: The x-axis interval between 20 and 80 should be removed or compressed, rather than simply changing the displayed axis limits. The remaining x-axis values (below 20 and above 80) should be displayed continuously, with a small gap between them. The plot should retain one single continuous rectangular panel border, rather than having separate borders for the two sections. The original x

Comments

Sign in or sign up to comment and upvote.

No comments yet.