<font face="trebuchet ms,sans-serif">Uma forma de formatar é usar a função axis.POSIX() veja,<br><span style="font-family:courier new,monospace"><br>#------------------------------------------------------------------------------------------<br>
# gráficos de séries no tempo<br><br>met <- read.table("<a href="http://www.leg.ufpr.br/~walmes/data/metereologia.txt">http://www.leg.ufpr.br/~walmes/data/metereologia.txt</a>",<br> header=TRUE, sep="\t", stringsAsFactors=FALSE)<br>
str(met)<br>names(met) <- tolower(names(met)) # passa os nomes para minúsculas<br><br>#------------------------------------------------------------------------------------------<br># conversão com a função as.POSIX*<br>
<br>met$data <- as.POSIXct(met$data, format="%Y-%m-%d")<br>plot(temp~data, data=met, type="l", xaxt="n")<br>axis.POSIXct(1, at=seq(as.POSIXct("2009-10-01"),<br> as.POSIXct("2011-10-01"), by="month"), format="%B", col=2)<br>
<br>plot(temp~data, data=met, type="l", xaxt="n")<br>axis.POSIXct(1, at=seq(as.POSIXct("2009-10-01"),<br> as.POSIXct("2011-10-01"), by="month"), format="%m/%y", col=2)<br>
<br>#------------------------------------------------------------------------------------------<br># duas séries em um mesmo gráfico<br><br>par(mar=c(5.1,4.1,4.1,4.1))<br>plot(temp~data, data=met, type="l", xaxt="n")<br>
par(new=TRUE)<br>plot(urel~data, data=met, type="l", xaxt="n", yaxt="n", ylab=NA, col=2)<br>axis(4, col=2)<br>mtext("urel", side=4, line=3)<br>axis.POSIXct(1, at=seq(as.POSIXct("2009-10-01"),<br>
as.POSIXct("2011-10-01"), by="month"), format="%m/%y")</span><br><br>À disposição.<br>Walmes.<br><br clear="all"></font><div><span style="font-family:trebuchet ms,sans-serif">==========================================================================</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">Walmes Marques Zeviani</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">Departamento de Estatística - Universidade Federal do Paraná</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">fone: (+55) 41 3361 3573</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">VoIP: (3361 3600) 1053 1173</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">e-mail: <a href="mailto:walmes@ufpr.br" target="_blank">walmes@ufpr.br</a><br>
skype: walmeszeviani<br style="font-family:trebuchet ms,sans-serif"></span><span style="font-family:trebuchet ms,sans-serif">twitter: @walmeszeviani</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">homepage: <a href="http://www.leg.ufpr.br/%7Ewalmes" target="_blank">http://www.leg.ufpr.br/~walmes</a></span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">linux user number: 531218</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">==========================================================================</span><br>
</div><br>