Re: [R] Make plots with GNUplot. Have anyone tried that?

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon, 03 Mar 2008 14:16:15 +0000 (GMT)

On Mon, 3 Mar 2008, Martin Maechler wrote:

>>>>>> "LH" == Louise Hoffman <louise.hoffman@gmail.com>
>>>>>> on Sat, 1 Mar 2008 00:54:56 +0100 writes:
>
> >> If you still want to then read ?write.table, that can export your data
> >> into a spreadsheet-like ascii format which can be used from GNUplot
> >> easily.
>
> LH> Very interesting.
>
> LH> So if I e.g. write:
> LH> ts.sim <- arima.sim(list(order = c(1,1,0), ar = 0.7), n = 200)
> LH> ts.plot(ts.sim)
>
> LH> How do I know the names of the rows to put in the data.frame() command?
>
> >> Btw, comparing the graphics capabilities of GNUplot and R, it is
> >> something like a three-wheel bicycle and a spaceship. Guess
> >> which is which.
>
> LH> =) I know that I will most likely spend a lot of time on just making
> LH> the plots, but I atleast (for now =) ) think it could be fun to try.
>
> if you make them with R, yes.
>
> I wholeheartedly support Gabor's point:
>
> I'd consider GNUplot to be clearly inferior to R -- just talking
> about the graphics possibilties and the quality / thoughtfulness
> in the high-level plotting.
> If you have your data / objects / functions in R,
> I'm very strongly convinced that using GNUplot for plotting is
> ``the wrong'' approach by almost all definitions of "wrong".

In a later message Louise mentioned the desire to use TeX fonts for annotation, to match a LaTeX document. Paul Murrell has pointed out his and my article in R-News 2006-2 about how to do this.

Louise almost mentioned the 'the gnuplot cvs which have pdfcairo support'. Well, R too has development versions, and I was able to do

> par(family="cmr10")
> plot(1:10)

in R-devel and get annotations in Computer Modern on screen, or

> cairo_pdf()
> par(family="cmr10")
> plot(1:10)

and get this on a PDF file.

To do so you would need /usr/share/fonts/mathml/cmr10.ttf installed, at least on F8 (part of the mathml-fonts RPM).

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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.
Received on Mon 03 Mar 2008 - 14:34:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 03 Mar 2008 - 16:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive