Tag Archives: Plotting

Plotting in Grids

This is post #12 in a running series about plotting in R. I regularly find myself wanting to show arrays or grids of plots in R. This is straightforward using par and mfrow as long as you want a symmetric, … Continue reading

Posted in Plotting, R, Statistics, Visualization | Tagged , | Leave a comment

Shading Pieces of an R Plot

This is post #11 in a running series about plotting in R. I often want to shade pieces of an R plot, in order to visually draw out some piece, such as weekends or recessions. Let’s look at how to … Continue reading

Posted in Plotting, R, Visualization | Tagged , | Leave a comment

Multiple Y Axes in R Plots — Part 9 in a Series

This is post #09 in a running series about plotting in R. Frequently, you want to plot data that is not at all on the same scale. In R, this is done via plotting a second graph on top of … Continue reading

Posted in Plotting, R, Visualization | Tagged , | 2 Comments

Visualizing and Comparing Distributions — Part 8 of a Series

This is post #08 in a running series about plotting in R. Last time, I talked about visualizing the Uniform, Normal, Exponential, and Poisson Distributions. However, there are more useful methods than just plotting the density and distribution functions. Of … Continue reading

Posted in Plotting, R, Statistics, Visualization | Tagged , | Leave a comment

Multiple Plots and Visualizing Distributions – Part 7 in a Series

This is post #07 in a running series about plotting in R. I was helping a friend plot some interesting distributions this weekend, so I decided to use distributions to demonstrate one of the neater bits of R’s basic plotting … Continue reading

Posted in Plotting, R, Statistics, Visualization | Tagged , | 1 Comment

Labeling Plots – Annotations, Legends, etc — Part 6 in a Series

This is post #06 in a running series about plotting in R. You regularly want to label pieces of a plot in order to point a particular feature out or answer a question that your audience will have. Let’s see … Continue reading

Posted in Plotting, R, Visualization | Tagged , | Leave a comment

Plotting With Custom X Axis Labels in R — Part 5 in a Series

This is post #05 in a running series about plotting in R. There are a variety of ways to control how R creates x and y axis labels for plots. Let’s walk through the typical process of creating good labels … Continue reading

Posted in Data Munging, Plotting, R, Visualization | Tagged , | 1 Comment

Plotting Multiple Series in R — Part 4 in a Series

This is post #04 in a running series about plotting in R. Frequently, you want to simultaneously plot multiple series on the same plot. Let’s try plotting daily observations along with a 30 day moving average. To start, I have … Continue reading

Posted in Data Munging, Plotting, R | Tagged , | 2 Comments

Comparing Many Variables in R with Plots — Part 3 in a Series

This is post #03 in a running series about plotting in R. Say you have a data frame with a number of variables that you would like to compare against each other. While you could plot them all on the … Continue reading

Posted in Plotting, R, Visualization | Tagged , | Leave a comment

Saving Plots in R — Part 2 of a Series

This is post #02 in a running series about plotting in R. Though the docs are relatively clear on how to save an R plot to disk in a variety of formats, I had some trouble figuring out how because … Continue reading

Posted in Plotting, R, Visualization | Tagged , | Leave a comment