Quantcast
Channel: Category Name
Viewing all articles
Browse latest Browse all 5971

A fresh look for base graphics

$
0
0

While ggplot2 (and its various extensions) is often the go-to package for graphics in R these days, if you need to step outside the boundaries of what ggplot2 can do, you can always step back to base R graphics (and the built-in lattice package) and customize to your hearts content.

The problem is that (unlike for ggplot2) the default look for base graphics is kinda ... meh. That being said, the base graphics system offers almost unlimited flexibility, both via function options and via the par system for modifying layouts and graphic defaults. As Colin Gallespie explains in a recent blog post, you can take a scatterplot that looks, by default, like this:

Base1

and with a little extra code, make it look like this:

Base2

Find out how in Colin's blog post, linked below.

The Jumping Rivers Blog: Styling Base R Graphics


Viewing all articles
Browse latest Browse all 5971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>