1981 search results for "ggplot"

Sales Dashboard in R with qplot and ggplot2 – Part 1

April 2, 2014
By
Sales Dashboard in R with qplot and ggplot2 – Part 1

In a previous post on my personal blog about creating Pivot Tables in R with melt and cast we covered a simple way to generate sales reports and summary tables from a data set consisting of orders. It is often said that a picture is … Continue reading →

Read more »

Kaplan-Meier plots using ggplots2 (updated)

April 1, 2014
By
Kaplan-Meier plots using ggplots2 (updated)

About 3 years ago I published some code on this blog to draw a Kaplan-Meier plot using ggplot2. Since then, ggplot2 has been updated (from 0.8.9 to 0.9.3.1) and has changed syntactically. Since that post, I have also become comfortable with Git and Github. I have updated the code, edited it for a small error,

Read more »

A Simple Introduction to the Graphing Philosophy of ggplot2

March 28, 2014
By
A Simple Introduction to the Graphing Philosophy of ggplot2

Blog post: a very basic introduction to building data plots using ggplot2 in R. #Rstats

Read more »

Using R: barplot with ggplot2

March 19, 2014
By
Using R: barplot with ggplot2

Ah, the barplot. Loved by some, hated by some, the first graph you’re likely to make in your favourite office spreadsheet software, but a rather tricky one to pull off in R. Or, that depends. If you just need a barplot that displays the value of each data point as a bar — which is

Read more »

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 »