How to set scale/ interval for scale_x_discrete

Hi. I've made a plot by using ggplot and I'd like to set the scale/ interval for my x-axis from 0 to 40000 per 1000. Here is what I have:

ggplot(aes(x=Size, y=MoE)) + geom_point() + scale_x_discrete(breaks=seq(0, 40000, 1000))

I know how to set it for continuous data but not for discrete data. Can anyone help me out please? Thank you in advance!

Could you run str(my_table$Size) and post the result? (Where your table is my_table :slight_smile: )

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

Hi! Just realized that I had made a terrible mistake that I forgot to use as.numeric. When I corrected it, my plot was much better. That was me being dumb but still, I appreciate your help!