> There is a very basic interface between R and gnuplot in the TeachingDemos
> package.  Look at the help for gp.plot.
[snip]

This looks mighty interesting =)

Is it possible to plot "with lines" (gnuplot syntex) so all the data
points are connected?

Also is it possible to make it write the output to a pdf file? (I
using the gnuplot cvs which have pdfcairo support)

When I try this, it doesn't write the pdf file. it works with gnuplot cvs.

library(TeachingDemos)
fuelData<-read.table('fuel.csv',header=TRUE, sep=',')
attach(fuelData)
gp.open(where='/usr/local/bin/gnuplot')
gp.send('set terminal pdfcairo font 'cmr10' size 8cm,4.6cm')
gp.send('set output '../figures/q1-raw-data-gp.pdf'')
gp.send('unset key')
gp.send('set xlabel 'rtime'')
gp.send('set ylabel 'FPI'')
gp.send('set xrange [1979:2005]')
gp.plot(rtime,fpi)
gp.send('unset output')
gp.close()

______________________________________________
R-help@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.

Reply via email to