1950 search results for "ggplot"

Rewriting plot.qcc using ggplot2 and grid

March 3, 2014
By
Rewriting plot.qcc using ggplot2 and grid

A new ggplot2-based implementation of control charts for the #RStats package qcc, and some lessons learned along the way.

Read more »

Simply creating various scatter plots with ggplot #rstats

February 28, 2014
By
Simply creating various scatter plots with ggplot #rstats

Inspired by these two postings, I thought about including a function in my package for simply creating scatter plots. In my package, there’s a function called sjp.scatter for creating scatter plots. To reproduce these examples, first load the package and then attach the sample data set: The simplest function call is by just providing two

Read more »

Books and lessons about ggplot2

February 19, 2014
By
Books and lessons about ggplot2

I recently got an email from a person at Packt publishing, who suggested I write a book for them about ggplot2. My answer, which is perfectly true, is that I don’t have the time, nor the expertise to do that. What I didn’t say is that 1) a quick web search suggests that Packt doesn’t

Read more »

ggplot2: Cheatsheet for Visualizing Distributions

February 18, 2014
By
ggplot2: Cheatsheet for Visualizing Distributions

In the third and last of the ggplot series, this post will go over interesting ways to visualize the distribution of your data.

Read more »

Add a background png image to ggplot2

February 16, 2014
By
Add a background png image to ggplot2

Hey everybody, this is just a short post but I found it very useful. I want to show you how to add images as a background to your ggplot2 plots. To do so we need the packages png and grid Btw, this is just a cool and fast way to import different packages at once. …

Read more »

ggplot Fit Line and Lattice Fit Line in R

February 13, 2014
By
ggplot Fit Line and Lattice Fit Line in R

Let's add a fit line to a scatterplot!Fit Line in Base GraphicsHere's how to do it in base graphics:ols <- lm(Temp ~ Solar.R, data = airquality)summary(ols)plot(Temp ~ Solar.R, data = airquality)abline(ols)Fit line in base graphics in RFit Line in...

Read more »

Scraping Pro-Football Data and Interactive Charts using rCharts, ggplot2, and shiny

February 10, 2014
By

This post uses pro-football (American) boxscore data from 1966 through 2013 and generates few interactive charts using rCharts, ggplot2 and shiny.  It also provided a first time exposure to the power of dplyr. Data for these charts were scraped fr...

Read more »

Creepypasta – Votes vs. Rating (& learning ggplot2)

February 8, 2014
By
Creepypasta – Votes vs. Rating (& learning ggplot2)

Excel: R, base package:R, ggplot:Am I overfitting? Probably.Code: More fun stuff to come....ReferencesSource data at Creepypasta.com:http://www.creepypasta.com/creepypasta-ratings-index/Code on gist:http://gist.github.com/mylesmharrison/8886272Creepypa...

Read more »

ggPlot2: Histogram with jittered stripchart

February 5, 2014
By
ggPlot2: Histogram with jittered stripchart

Here is an example of a Histogram plot, with a stripchart (vertically jittered) along the x side of the plot.Alternatively, using the geom_rug function:Of course this simplicistic method need to be adjusted in vertical position of the stripchart or rug...

Read more »

Boxplot with mean and standard deviation in ggPlot2 (plus Jitter)

February 2, 2014
By
Boxplot with mean and standard deviation in ggPlot2 (plus Jitter)

When you create a boxplot in R, it automatically computes median, first and third quartile ("hinges") and 95% confidence interval of median ("notches").But we would like to change the default values of boxplot graphics with the mean, the mean + st...

Read more »