Earlier today I helped make a figure for a proposal about marmot hibernation patterns. The goal was to make a figure similar to Figure 1 in Lee et al. 2016 (J. Mamm.), which shows the body temperatures of four marmots as well as the temperature of the soil in their burrow:
I was working with a 3-column dataset in tab-delimited (.txt) format that looked like this:
Date.Time Temp Label
5-9-2008 14:04 -3.67 soil
5-9-2008 14:44 -3.64 soil
5-9-2008 15:24 -3.61 soil
5-2-2009 14:36 37.23 marmot
5-2-2009 14:56 37.23 marmot
5-2-2009 15:16 36.12 marmot
The following code is my attempt to replicate the figure above using ggplot2 in R:
#load the ggplot2 library
#import the data file
Data <- read.delim("~/Desktop/Marmots_and_Soil_Data.txt")
#define the format of our Date.Time column
Data$Date.Time<-strptime(Data$Date.Time, format= "%m-%d-%Y %H:%M")
#convert the Date.Time column to a format that ggplot2 can read
#plot the data
ggplot(data=Data, aes(x=Date.Time, y=Temp, group=Label, colour=Label)) +
ylab("Temperature (ºC)") +
I have to share a website I just found: colorbrewer2.org
It allows you to select the number of data classes you have (from 3-12), and it provides attractive color palette options. You can even toggle a "colorblind friendly" option.
To find colors that are maximally divergent from one another, choose a "diverging" palette.
I was excited to stumble upon this github page today: https://github.com/rdmpage/mammal-species-of-the-world
It includes a file called "MSWIII_Dictionary.dic," which is a custom dictionary containing all valid linnean rank names (from order to species epithet) for mammals, according to Wilson & Reeder's Mammal Species of the World, 3rd Edition.
Now my manuscripts have a lot less red underlining!
Note that all derivations of names (e.g., "tenrecid" or "afrotherian") are not included, but can easily be added by opening the .dic file in a text editor.
Custom dictionaries can be uploaded following these instructions: https://support.microsoft.com/en-us/kb/322198
Just hit ESC. You're welcome.
*A situation where you might have this problem:
I have a treefile with 5000 trees in it.
I import this file into R using the package ape, so the class for this object is multiPhylo.
I enter the command "plot(trees)," like an idiot.
RStudio plots each tree, one at a time, with the text output "Hit <Return> to see next plot:"
I tried "^c" and a bunch of other things. My office mate suggested that I set my coffee cup down on the return key until it stops.
Turns out I just had to hit ESC. Duh!
I'm Katie Everson, a PhD candidate in Fairbanks, Alaska. Happy phylogening!