I don’t know about you, but sometimes having my indices appended next to each other just doesn’t cut it if I’m really trying to examine the relationship between two datasets. Enter palyoplot_plotOverlaidIndices()!
That’s right, with one swift function plot multiple indices (no limit, but don’t make a spaghetti vomit diagram please) on the same diagram. Featuring styling too: style, color, linetype, and barsize. Plus! All the display features you know and love from palyoplot_plotIndex().
So how do you do it? Let’s check it out! First, some basic data prep (age/depth and two variables of data (xdata1 and xdata2) to plot)
Now, to configure the data. This part is very important because you can pass in as many indices as you want. (1) make sure the variable is a list. (2) xdata and ydata are required (and use those keys). (3) the styling keys (style, color, linetype, barsize) are optional, but if you use a key make sure it has a value for each of the indices you’re graphing.
In this example, we’re going to use the styling keys color and linetype — one for each index
Now, call the function to plot — the graph styling parameters are the same as palyoplot_plotIndex(), which we’re going to use to make it a bit prettier. Returns a gtable object
And with those few lines of code we get the beauty above!
Want to go crazy? Plot as many indices as you want (but no spaghetti vomit please). As a proof of concept (this is why we don’t do vomit spaghetti)…
Not sure why you might want so many, but hey, ya never know.