Remove a specific x value from ggplot
<p>I want to remove the points 4 and 5 from the x-axis of the plot I generated using ggplot. Currently my x-values only include 0, 1, 2, 3, and 6. </p>

<p>Here is the my.data data frame:</p>

<pre><code>       x             y
1      2     0.1250000
2      0     0.3750000
3      0     0.3500000
4      0     0.6060606
5      1     0.7000000
6      0     0.6000000
7      0     0.4500000
8      6     0.9500000
9      0     0.7000000
10     3     0.5000000
11     0     0.6000000
12     3     0.1250000
13     0     0.3750000
14     0     0.3333333
15     1     0.6818182
16     0     0.0000000
17     2     0.5000000
</code></pre>

<p>Code:</p>

<pre><code>ggplot(my.data, aes(x,y)) + geom_point()+geom_smooth()
</code></pre>

<p>Here is the plot that is generated:</p>

<p><a href="https://i.stack.imgur.com/C4JPa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C4JPa.jpg" alt="enter image description here"></a></p>

<p>Thanks!</p>