<!--gterm notebook command=r-->
## Graphterm Notebook using R: Example 2



```{r}
# Load GraphTerm API helper functions
source(paste(Sys.getenv("GTERM_DIR"),"/bin/gterm.R", sep=""))

```

```output

```

```{r}
g <- gcairo()         # Setup device for GraphTerm
require("ggplot2")
p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_boxplot()
g$frame()             # Display plot as inline image
```

```output

format = ARGB (400 x 300)

```

![image][output-fig1-R-example2.R.md]

[output-fig1-R-example2.R.md]: data:image/png;base64,[encoded data, 11776 characters]
