#Initialize the gnuplot handle
h1<-Gpinit()
## Not run:
# GpWindowStatus(0)
# #plot sin(x)
# GpplotEquation(h1,'sin(x)','')
# GpWindowStatus(0)
# #pause R and gnuplot
# Gppause()
# GpWindowStatus(0)
# ## End(Not run)
#close gnuplot handle
h1<-Gpclose(h1)
Run the code above in your browser using DataLab