How to shift the axis from continuous to discrete one?

r
ggplot2

#1

I am currently working on one data set name as Mitchell which comes under alr3 package of R.I want to look the relation between the month and Temp so I have plotted the scatter plot between them but the month came as continuous.I want to break the x-axis by each 12 months so I can better understand relation.

ggplot(aes(x=Month,y=Temp),data=Mitchell)+geom_point()

Here the month in a continuous way.I want to break it by every 12 months.


#2

Perhaps this will help:

##Create a new variable mon to represent the month.

Mitchell$mon = Mitchell$Month %% 12
ggplot(aes(x=mon,y=Temp),data=Mitchell)+geom_point()'