I have two files that I want to plot in the graph. Below are the files:
File 1:
structure(c(1000, 935, 925, 903, 868, 850, 805, 797, 759, 738,
734, 700, 683, 666, 567, 562, 500, 487, 461, 416, 400, 393, 372,
364, 357, 338, 333, 329, 315, 300, 283, 280, 263, 250, 231, 200,
189, 176, 150, 141, 119, 104, 103, 101, 100, NA, 21.4, 21.2,
20.4, 19.1, 18.4, 17, 17.8, 17.4, 14.7, 14.2, 13.2, 12, 10.8,
-0.7, -1, -4.9, -5.8, -7.7, -12.5, -14.3, -15.1, -17.5, -18.5,
-19.9, -22.3, -23.1, -23.7, -26, -28.5, -31.5, -32.1, -35.9,
-38.9, -43.5, -51.9, -55.1, -59.1, -67.1, -70, -78.1, -84.5,
-83.3, -80.9, -79.1), .Dim = c(45L, 2L))
File 2:
structure(c(1000, 950, 900, 850, 800, 750, 700, 650, 600, 550,
500, 450, 400, 350, 300, 250, 200, 150, 100, NA, 25.4, 27.2,
20.5, 18.1, 17.4, 16, 14.2, 13.2, 12, 10.8, -0.7, -1, -4.9, -17.5,
-84.5, -83.3, -80.9, -79.1), .Dim = c(19L, 2L))
PROBLEM:
1 The first file has irregular intervals, and the second File has regular intervals of 100. I have multiple files similar to File 1 (also with irregular intervals). How do I plot these 2 files in 1 figure? I want to specify the interval when plotting to 100.
I tried plotting this in R using the plot() option and par(new=T). The result si as follow:
The y-axis appears to plot on top of each other.
[2] I want to plot the y-axis as inverted with 1000 at the lowest level.
[3] Is there a way to do this in ggplot?
Any suggestions on how to do this in R?
I'll appreciate any help.