[Rd] More plotting comments

Telford Tendys telford@progsoc.uts.edu.au
Mon, 14 Feb 2000 20:23:23 +1100


None of this is greatly important but might be a bit useful to someone.
BTW, I have 0.99a installed, it compiled without a problem.

I've discovered most of the plotting facilities including the legend()
function and the various text annotations, this is nice an convenient
and flexible enough to do most things. One thing that I must say is that
the help pages on plot() and plot.default() really SHOULD include legend()
in the see-also list because I tried all sorts of things before I found it,
apropos( "key" ), apropos( "note" ), apropos( "annotate" ).

Another tiny thing, is there an official way to put angles or temperature
on a graph? I have been using expression(90^o) for a 90 degree angle which
looks OK but kind of cheats the philosophy of the expression system.
Does anything matter other than how it looks when it prints?

Finally, when I do a plot like this:

	curve( sin, lty="12345678" )

I get a reasonable looking curved line on my X11 window but then I
do the same thing in postscript I get the interesting result that the
dashes are very tiny when viewed in ghostscript (5.10) but sensible
length on paper from the printer. Is this a ghostscript bug or is there
something non-portable about R output files?

An simple example of setting up an eps output for a report might be
helpful because a lot of people will be doing it. Just a suggestion:

ps.options( horizontal=FALSE, onefile=FALSE, paper="special" )
postscript( "/tmp/test.eps", width=4, height=3 )
par( mar=c( 3.5, 3.5, 0, 0 ), ps=10, mgp=c( 2.5, 1, 0 ))
curve( sin, 0, 2 * pi, lty="1494" )
dev.off()

I know it isn't as flashy as some of the existing examples but it does
demonstrate the typical things that you are going to need such as
point sizes, paper sizes, margins, etc. It is also something that can
quickly be grabbed and used by most people.

	- Tel
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._