Setting the x & y ticks to a sequential

Hi everyone,

I have a plot in which I'd like the xticks to be seq(0, 240, 24). I've tried many ways but surprisingly none of them worked.
If you got a solution, your help is much appreciated

Thanks :slightly_smiling_face::slightly_smiling_face:

Use the breaks argument to ggplot2::scale_x_continuous like so:


mtcars %>% 
    ggplot(aes(x = disp, y = hp)) + 
    geom_point() +
        breaks = seq( 
            from = 0, # Adjust the from, to, and by arguments as needed
            to = 500,
            by = 20


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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.