Description Usage Arguments Value Author(s) See Also Examples
GploadDemo
loads a .dem gnuplot file and executes it,
allowing pause statements
1 | GploadDemo(handle, mfile)
|
handle |
handle to the connection |
mfile |
.dem gnuplot file name |
none
Jose' Gama
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #example of using GploadDemo and GpreadURL2string
#Initialize the gnuplot handle
h1<-Gpinit()
#change gnuplot's working directory to be the same as
# R's working directory (default)
Gpsetwd(h1)
#load the file 'simple.dem'
#Gpcmd(h1, 'set terminal postscript eps color;set output "simple.eps"\n'
# %s% GpURL2string('http://gnuplot.sourceforge.net/demo_svg/simple.1.gnu') %s%
#'\nset terminal X11;set output')
## Not run:
if (!file.exists('/usr/share/doc/gnuplot-doc/examples/simple.dem'))
stop('Please install gnuplot-doc')
GploadDemo(h1, '/usr/share/doc/gnuplot-doc/examples/simple.dem')
#pause R and gnuplot
Gppause()
# example of GpreadURL2string
#Kuen's Surface
gpcode<-GpURL2string('http://gnuplot.sourceforge.net/demo/transparent_solids.2.gnu')
#send gnuplot script
Gpcmd(h1, gpcode)
#Gpcmd(h1, 'set terminal postscript eps color
#set output "KuensSurface.eps"\n'
#pause R and gnuplot
Gppause()
## End(Not run)
#close gnuplot handle
h1<-Gpclose(h1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.