plotting

Mapping Bike Accidents in R

September 14, 2012 | Corey Chivers

At last weekend’s Hack Ta Ville event here in Montreal, I joined up with some talented urban planners and web devs to realize Vélobstacles. The idea of the project is to crowd source information on cycling conditions around the city. As with any crowd sourcing project, we were ... [Read more...]

How to remember point shape codes in R

April 24, 2012 | John Mount

I suspect I am not unique in not being able to remember how to control the point shapes in R. Part of this is a documentation problem: no package ever seems to write the shapes down. All packages just use the “usual set” that derives from S-Plus and was carried ... [Read more...]

Bare-bones intro to Plotting options in R

March 21, 2012 | Isomorphismes

If you’re using base::plot in R for the first time (for example if you do plot(pima) or plot(faithful) (use ??pima if you can’t find the dataset)) you may have looked at ?plot (2 page help file) or ?par (12 page help file) to figure out what’s ... [Read more...]

How did I make this plot?

April 9, 2011 | Tony Cookson

To make this plot, I used R's plot(), points() and lines() commands. If you have been wanting to learn how to plot in R, watch it unfold in this video tutorial:Also, here's the code I used:
[Read more...]

How to Shade Under a Normal Density in R

April 3, 2011 | Tony Cookson

The easiest-to-find method for shading under a normal density is to use the polygon() command. That link is to the first hit on Google for "Shading Under a Normal Curve in R." It works (like a charm), but it is not the most intuitive way to let users p...
[Read more...]

Basic Plots in R

March 7, 2011 | Tony Cookson

Here's a tutorial I recorded on producing basic plots in R.I lost the script file I used to create the video to a horrifying black screen of death, but I used the data from the previous post (available here). Hopefully, the video is clear enough that ...
[Read more...]

Maps without map packages

July 1, 2010 | dan

LATITUDE + LONGITUDE + OVERPLOTTING FIX = MAPS Decision Science News is always learning stuff from colleague, physicist, mathlete, and all-around computer whiz Jake Hofman. Today, it was a quick and clean way to make nice maps in R without using any map packages: just plot the latitude and longitude of your data ... [Read more...]

Modifying basic plots in R

May 4, 2010 | Luke Miller

Below is a walk-through of some of the basics of customizing plot in R. These are all based on the graphics package that comes in the base installation of R. Let’s start by making a basic plot in R. In the code snippets below, green text behind a... [Read more...]

Plotting “time of day” data using ggplot2

April 14, 2010 | nsaunders

William asks: How can I make a graph that looks like this, “tweet density” style, showing time intervals? He then helpfully describes his input data: a CSV file with headers “time started, time finished, date”. Here’s a simple CSV file, tasks.csv: task,date,start,end task1,2010-03-05,09:00:00,13:00:00 ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)