demo/hello2.R

# Rgnuplot's 'Hello World!' - inline gnuplot Initialize the gnuplot handle
h1 <- Gpinit()
# send gnuplot commands
Gpcmd(h1, "set xlabel \"x\"\nset ylabel \"y\"\nset style \"line\"\nset title \"Hello World!\"\nplot sin(x)")
# pause R and gnuplot
Gppause()
# close gnuplot handle
h1 <- Gpclose(h1) 

Try the Rgnuplot package in your browser

Any scripts or data that you put into this service are public.

Rgnuplot documentation built on May 1, 2019, 9:17 p.m.