Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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:
and with a little extra code, make it look like this:
Find out how in Colin's blog post, linked below.
The Jumping Rivers Blog: Styling Base R Graphics
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.