I am trying to create a line graph with rotated x and y axes.
This is what my graph looks like, but
I am using the basic plot
function in R as I am unfamiliar with ggplot2
.
My code thus far is:
mytab=read.csv("stratotyperidge.csv")
plot(mytab$meters,mytab$d180,lwd=2,col="darkblue",bty='n',type='b',xlab="Height above base (m)",ylab="d180",main="Stratotype Ridge", horiz=TRUE)
But horiz=TRUE
returns an error, although I have used it with barplot
. I do not want to save my plot as an image and simply rotate it. I want to plot it like the picture linked above. This specific question has not been answered on SO.
This is what my data looks like:
ID# Identifier 1 d180 d13C meters
1 JEM 1 -6.5 1.09 0.5
2 JEM 2 -6.99 0.38 0.85
4 JEM 4 -6.94 0.66 10
5 JEM 5 -6.39 0.75 30.8
6 JEM 6 -7.15 0.38 50.2
7 JEM 7 -8.14 0.03 62.15
8 JEM 8A -7.4 0.33 71
8.5 JEM 8B -7.21 -0.05 71.4
10 JEM 10 -7.39 0.14 82.4
12 JEM 12 -7.27 1.22 87.5