openair News Recent news from the openair R package Contents The openair Project newsletter Issue 15, November 2013

source OPEN openair News The openair Project newsletter Issue 15, November 2013 Recent news from the openair R package This issue focuses on how t...
Author: Ariel Goodman
0 downloads 0 Views 2MB Size
source

OPEN

openair News The openair Project newsletter

Issue 15, November 2013

Recent news from the openair R package This issue focuses on how to annotate openair plots. Plot annotation has been a frequently requested capability. This newsletter was produced using R version 3.0.2 and openair version 0.9-0. To update to the most recent version of openair, type update.packages() and make

Contents Recent news from the openair R package . . . . .

1

sure you are using the most recent version of R. If you have difficulty, start a new R session (please use the most recent version of R — 3.0.2) and type install.packages("openair"). mailto:[email protected]

openair plot annotation . . . . . . . . . . . . . . Updates to polarPlot . . . . . . . . . . . . . . . . Other openair developments . . . . . . . . . . . .

2 5 6

Issue 15, November 2013

2

openair plot annotation A frequently asked question about openair and requested feature is how to annotate plots. While all openair functions could have options to allow annotations to be made, this would make the functions cumbersome and reduce flexibility. Nevertheless it is useful to be able to annotate plots in lots of different ways. Fortunately there are existing functions in packages such as lattice and latticeExtra that allow for plots to be updated. An example of the sorts of annotation that are possible is shown in Figure 1, which is an enhanced version of Figure 17.1 in the manual. These annotations have been subsequently added to Figure 17.1 and built up in layers. This section considers how to annotate openair plots more generally and uses Figure 1 as an example of the types of annotation possible. Also considered specifically is the annotation of plots that are in polar coordinates, as these can sometimes benefit from different types of annotation. There are several different types of objects that can be useful to add to plots including text, shapes, lines and other shading. Given that many openair plots can consist of multiple panels, it is also useful to think about how to annotate specific panels. The examples given in this section will apply to all openair plot, the only difference being the coordinate system used in each case. The basis of openair annotations is through the use of the latticeExtra package, which should already be installed as part of openair. In that package there is a function called layer that effectively allows annotations to be built up ‘layer by layer’. The function below is needed for some of the plot annotations. poly.na

Suggest Documents