Week 3: Rstudio, Jupyter notebooks, and publication-quality graphics

Background materials:

Lecture notes

For the lab this week, we will work through this set of exercises.

If you know ggplot well already and/or have time, work through this tutorial about dplyr.

Useful free resources:

Books:

Getting image files ready for publication.

There are a lot of ways to do this! Here’s one that works well.

Background

So, here is what we do:

  1. Save graphics as 600dpi TIFF:
tiff('plot.tiff',height=x,width=y,res=600)

This makes a really big file!

  1. Use ImageMagick to convert to smaller tiff:
convert plot.tiff -set colorspace RGB -layers flatten -alpha off \
-compress lzw -depth 8  -density 600 -adaptive-resize 4500x2400  plot.compressed.tif
  1. Use ImageMagick again to make a final pdf:
convert plot.compressed.tif plot.compressed.pdf

We have a shell script online to automate the process. Get it here.