Colours with R: Transparent Colours

Transparent colours? No justification is necessary.

Figure 1. Hourly averages for air and water temperature. Data are for Nov 1 – 7, 2012, UTC. Location: Cambridge Bay, Cambridge Bay Dock station (69.114 N, 105.060 W, water depth 6 m). Data source: NEPTUNE Canada (accessed Nov 2012 at

The following script will produce a random scatter plot, in the style of Figure 1. The fourth component of the “rgb” function indicates the transparency. I found out about how to make transparent colours by flipping through Murrell (2011). The data plotted are from the NEPTUNE Canada observatory at Cambridge Bay. To see more arctic oceanographic data go to Click on “DATA & TOOLS” and log in. Then click on “Data Search,” click on “Tools” and choose “Arctic Observatory.”

R Script

X <- runif(200,0,1);
Y <- runif(200,0,1);
plot(X,Y, col=rgb(0,0,1,0.5), cex=5, pch=19);


Murrell, Paul. 2011. R Graphics, 2nd Edition. CRC Press.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s