Good morning, I am currently displaying a time series with the time on the Y axis, and the values on the X axis. The problem is that I wanted to reverse the Y axis (that is, to have the latest date the closest to the X axis). So I looked for a way to do this on this mailing list and I found a response: inverting the ylim parameter of the plot. I did it, the data are displayed correctly, but now the problem is that there is no more labels on the Y axis. How should I proceed to have it back? Here is my code: ******************************* sMin=min(series[,2:3]) sMax=max(series[,2:3]) plot(series[,2],dates,xlim=c(sMin,sMax),ylim=c(max(dates),min(dates)),col="green",main="",type="l",xlab="Value") ******************************* Thanks, -- Jeremie [[alternative HTML version deleted]]
Hello, i created a picture with the outlines of mosambik. Does anyone now, how i could mack a background the outlines with a map from mosambik from googlemaps? library(maps) library(mapdata) library(akima) map("worldHires", "Moz") regads Malte
(Note that you did not follow the posting guide - please always start a new thread/question by creating a new message - do not simply reply to an existing posting erasing the subject; such a message stays in the old thread and is hard to find in the archives) See package RgoogleMaps on your nearest CRAN mirror to load image tiles. Roger Bivand ----- Roger Bivand Economic Geography Section Department of Economics Norwegian School of Economics and Business Administration Helleveien 30 N-5045 Bergen, Norway -- View this message in context: http://n4.nabble.com/Date-label-lost-while-inverting-y-axis-tp1561283p1561498.html Sent from the R help mailing list archive at Nabble.com.
On Feb 19, 2010, at 2:20 AM, Jeremie Smaga wrote:> Good morning, > > I am currently displaying a time series with the time on the Y axis, > and the > values on the X axis. > The problem is that I wanted to reverse the Y axis (that is, to have > the > latest date the closest to the X axis). > So I looked for a way to do this on this mailing list and I found a > response: inverting the ylim parameter of the plot. > I did it, the data are displayed correctly, but now the problem is > that > there is no more labels on the Y axis. > How should I proceed to have it back? > > > Here is my code: > > ******************************* > sMin=min(series[,2:3]) > sMax=max(series[,2:3]) > plot(series[, > 2 > ],dates > ,xlim > = > c > (sMin > ,sMax > ),ylim > =c(max(dates),min(dates)),col="green",main="",type="l",xlab="Value") > ******************************* >Offhand I would guess: ..., xlim = rev (range( series([, 2:3] ) ), ... And I suppose you have your own reasons for not offering the data to test possible solutions. -- David.> Thanks, > > -- > Jeremie > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > 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.David Winsemius, MD Heritage Laboratories West Hartford, CT