0

I am trying to create a plot for my stable isotope data from sequential dentine sampling which provides deltaN15 and deltaC13 data as well as age assignments. I would like to have the x-axis be the age of the sample (i.e. 8 years old - 17 years old) while one y-axis would show the dN15 and the other the dC13 values. It would be two separate lines for each isotope and I know this can be done (I've seen it in papers). I know that in many cases having multiple y-axes is not preferred but this is an important indicator of health and famine when dealing with sequential dentine data.

I have tried the following code from a previous question, but it did not work:

par(mar = c(5, 4, 4, 4) + 0.3) # Leave space for z axis plot(df.OBF031$age, df.OBF031$δ..N) # first plot par(new = TRUE) plot(df.OBF031$age, df.OBF031$δ..C, type = "l", axes = FALSE, bty = "n", xlab = "", ylab = "") axis(side=4, at = pretty(range(df.OBF031$δ..C))) mtext("z", side=4, line=3) 

I have attached a picture of what I am hoping to create that my supervisor made in Excel.

Example of sequential dentine plot

This is the data from one of the individuals (each individual will get their own plot)

2
  • 3
    Welcome to Stack Overflow! Please add code and data as text (using code formatting), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and many more reasons. Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data. Commented Jul 24, 2024 at 16:59
  • 3
    Welcome to Stack Overflow! You should provide a minimal reproducible example of your code and data along with relevant errors. Please edit your question to include a minimal reproducible example so that readers can run your code to answer your question. Commented Jul 24, 2024 at 17:00

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.