I am using scale_x_discrete()
to customize ticks and labels of x-axis.
However, as figure shows, the lines cut the right-side y-axis, which doesn\'t look g
Why are you using a discrete scale for something at appears to be continuous.
If you replace scale_x_discrete
with scale_x_continuous
then this should work as you wish.
b <- a + scale_x_continuous(breaks = 2^(1:7))
b
You might be interested in a transformation to base 2, given the way your data for b
appear only to be integer powers of 2.
a + scale_x_continuous(breaks = 2^(1:7), trans = 'log2')