1
Content-Type: text/x-zim-wiki
4
====== GNU R Plot Editor ======
6
The GNU R plot editor is, as its name suggests, a simple dialog that allows you to insert plotting scripts in GNU R's 'S' language.
8
**Dependencies:** This plugin requires GNU R to be installed. For specific notebooks which others have created, bear in mind that they may have used GNU R with additional libraries installed. In this case, as well as GNU R, you will need the same libraries installed that others used.
12
Some quick examples of the GNU R syntax. For a complete reference see the links below.
15
{{./gnu_r_plot.png?type=gnu_r_plot}}
24
{{./gnu_r_plot001.png?type=gnu_r_plot}}
27
# Maunga Whau Volcano Example
28
# Copyright (c) //R Development Core Team [5]//
29
x <- 10*(1:nrow(volcano)); x.at <- seq(100, 800, by=100)
30
y <- 10*(1:ncol(volcano)); y.at <- seq(100, 600, by=100)
32
# Using Terrain Colors
34
image(x, y, volcano, col=terrain.colors(100),axes=FALSE)
35
contour(x, y, volcano, levels=seq(90, 200, by=5), add=TRUE, col="brown")
39
title(main="Maunga Whau Volcano", sub = "col=terrain.colors(100)", font.main=4)
43
===== Features Available =====
45
Be aware that this plugin pre-sets the png device to render graphics. For that reason, you should not try to use the other device commands (or to redefine the png device command). For example, the 3d plotting devices that render to OpenGL rather than png should not be used, nor should the jpg output.
47
Aside from this, most of R's advanced plotting power should be available to you.
49
===== References =====
51
* An Introduction to R [1]
55
* [1] http://cran.r-project.org/doc/manuals/R-intro.html
56
* [2] http://www.r-project.org/index.html
57
* [3] http://rwiki.sciviews.org/
58
* [4] http://cran.r-project.org/banner.shtml
59
* [5] http://addictedtor.free.fr/graphiques/RGraphGallery.php%3Fgraph%3D22