[R] Axes=F and plotting dual y axes

Johnson, Cedrick W. cedrick at cedrickjohnson.com
Wed Jul 28 18:16:23 CEST 2010

Howdy. Been running into a bit of trouble with plotting. Seems that 
axes=F is not "working". Whenever I plot (either a dataframe or xts/zoo 
series) and I set axes=F along with xlab/ylab="" I still get the default 
axes printed in my chart. Consider this:

#Create some sample data, both 50 units of blah
series2 = c(1:50)
series1 = rep(25:74)

testdf1 = as.data.frame(series1)
testdf1$series2 = series2

As a note, I converted my original xts/zoo dataset into a dataframe 
thinking it could be weirdness on the part of that. I just did this here 
to have something reproducible since it's not feasible to put my entire 
original dataset in the email.

plot(testdf1[,1], main="Woo", col=rich12equal, xlab="", ylab="", axes=F, 

It still displays the x and y axes. What I'm trying to do:


plot(testdf1[,2], ...)

and from there I can manually label the axes, title, etc.

Any idea what's going on? I'm using R 2.10.1 on ubuntu (I probably need 
to upgrade via debian packages soon)


ps: I am trying to accomplish this, as seen here: 
  -- but axes=F is giving me trouble.

More information about the R-help mailing list