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



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

```

```output

```

```{r}
g <- gcairo()         # Initialize Cairo device for GraphTerm output
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][fig1-R-example2.R.md]

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