[R] Scaling x axis

Jim Lemon drjimlemon at gmail.com
Fri Feb 26 03:24:05 CET 2016

Hi Fabio,
If you have more than a few dates on the X axis you may get
overlapping tick labels. As an example, take a plot of the winning
parties of by-elections held in Australia in the 21st century by the
dates of the elections:

 xlab="",ylab="Winning party",pch=as.numeric(be_parties))
mtext("By-election dates",side=1,line=4)

As you can see, most dates would overlap other dates using the standard axis.


On Thu, Feb 25, 2016 at 11:31 PM, Fabio Monteiro
<fabio.monteiro1992 at gmail.com> wrote:
> Hi
> i'm trying to plot my data in R and i can't manage to scale the x axis.
> My x axis are dates, months and years, and when I plot I only have the x
> axis like this (2002, 2004, 2006, 2008, 2010).
> I whant every date in the axis not only those years, i want to see every
> point with the respectively date in the axis.
> How can I do that?
> Kind regards
> Fábio monteiro
>         [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list