On Sun, 2005-06-12 at 00:07 +0100, Marcus D. Hanwell wrote:
> On Saturday 11 June 2005 23:21, Timothy H. Keitt wrote:
> > You can get publication quality plots from R with a bit of wrestling.
> > I've had good luck with it for quite complicated plots. First do
> > 'help(par)' and read carefully. The 'xlim' and 'ylim' parameters usually
> > work fine -- I've not seen values outside the given range. Can you post
> > your plot command? Also check out the 'lattice' package. There are some
> > R - graphics guides on the web that may help.
> >
> My plot command is as follows,
> 
> plot(test[[1]],test[[3]],type="l",xlab="Time (s)", ylab="Current (mA)", 
> col="black", las=1, xlim=c(30,1000))
> 
> It still decides to show 0 and a little below, and then 1000 and a little 
> above. May be there is some setting to tighten up the axes? Also need to 
> display the axes labels more concisely using scientific notation. I have put 
> a problem plot on the web so you can see the results,
> 
> http://dev.gentoo.org/~cryos/test.png

It is actually using your xlim. The default axis type leaves some
padding (white space) at the ends. (Notice that the plot line _does_ end
at c(30, 1000).) Try: plot(..., xaxs = "i") to eliminate the padding. 

For customized axis labels, try plot(..., axes = F) and then use the
"axis" command to generate the axes. You can specify exactly where you
want the ticks to occur and what text gets placed next to them.

THK 

> 
> You can see the incorrectly scaled axes - I want it to begin at dead on 0, or 
> may be 30 as I tried there but it doesn't seem to want to listen to me... I 
> do need to get it to produce some graphs with a small overlaid graph, and may 
> be some 2x2 graphs which both seem possible as far as I can tell.
> 
> I have found http://cran.r-project.org/doc/contrib/ which seems to have some 
> great docs in it. I am checking out usingR-2.pdf right now but haven't found 
> the answers to all my questions yet. These docs seem much better than the 
> previous stuff I found.
> 
> Thanks,
> 
> Marcus

-- 
[email protected] mailing list

Reply via email to