lizzieinvancouver / arees

0 stars 0 forks source link

Edits to plots after scrum 27.9.2023 #3

Open ngoj1 opened 9 months ago

ngoj1 commented 9 months ago

Here's a recap of what was brought up after scrum with regard to the AREES plots:

1) One pulse RESPONSE curve should be more uniform in terms of each species' responses; instead of having such variable ranges, maybe it's better to make their ranges all the same (it's conceptual)?

one_pulse_response_plot

tentative solution: We can make all 5 rnorm curves have the same standard deviation, and then use ylim to clip them so that they have layered appearance rather than 1 curve hiding the other 4 behind it

Side note: Think about whether or not phenological curves actually have rnorm patterning or conversely if rnorm is even the best method to simulate phenology. Also need to remove the red dashed line

2) One pulse CONCEPT plot is currently an rnorm curve that's being clipped by xlim(), but there should be an actual formula to make that curve shape with the steep beginning, peak at pulse, and slow taper towards y = 0.

one_pulse_concept

3) Colours for plots with 5 species (or any n species) need to have colours that convert well into grayscale; pick colours that span across the colour wheel so that we can good representation of different hue-value conversions

jornada_concept_abundance

lizzieinvancouver commented 9 months ago

@ngoj1

  1. Yes, I think it would be good to use a standard rnorm for all the species curves! That's what I have done in the past. My aim is to talk more about WHEN species would show up and how many, not that their distributions would vary in shape/size (though they would).
  2. Some code ... for a single pulse (sort of sharp but I think okay):
x <- seq(0, 20, length.out=1000)
dat <- data.frame(x=x, px=dexp(x, rate=0.65))
dat[1,2] <- 0
plot(dat$px ~ x, type="l", ylab="imaginary resource", xlab="time")

And the first two lines of code give an exponential; you can play around with the rate.

lizzieinvancouver commented 9 months ago

@ngoj1 Also, I just realized that one of the lab meeting papers is very relevant -- check out: https://esajournals.onlinelibrary.wiley.com/doi/10.1002/ecy.4061 .... can you also check if they mention public raw data? We might use that to see what real data curves look like (for another separate fig)? Thank you!

ngoj1 commented 9 months ago

Here's what I have for the new one pulse resource: image which certainly looks much neater than the method I used.

And here is the new one pulse response; I wasn't sure if this is what you had in mind, so of course open to modifications. image

The paper you linked has two case studies, with a direct link to a public dataset on the Swainson's thrush while the data for the salmon seems to be a bit more difficult to source. I'll take a look at the thrush data this week.

lizzieinvancouver commented 9 months ago

@ngoj1 Nice! For the second figure, the curves are supposed to represent species' phenological niches -- so we would not expect them to overlap so much (see Wolkovich & Cleland 2011 on the lab website for a simple example) and they should line up more with the resource. I really like having access to the lovely diversity of curves you made though and I am not 100% sure which to use. Perhaps for now you could put this version in Illustrator and I can choose which curves to use later (and play around in Illustrator myself)?

If not possible, I think something simple, where the niches (normal distribution curves) are identical and just slightly overlapping....

ngoj1 commented 8 months ago

I took a look at the paper you mentioned, and found this figure: image Is this the example you were referring to? I noticed that it looked a lot like the multi-pulse resource response curves, so I just took your initial advice and separated them out a bit and also made them line up with the resource pulse, like this:

image

Nevertheless, I saved this one and the original version (the first iteration of the one pulse response curves, with the high mean and sd diversity rnorms) as pdfs. I tried to save them as Illustrator files but R wouldn't recognize .ai as a valid graphics device, so if you have a specific idea in mind maybe you could sketch it out and I'll try my best to replicate exactly what you have in mind in ggplot?

ngoj1 commented 8 months ago

Oops, just posted the same photo twice. The second one should be this: image

lizzieinvancouver commented 8 months ago

@ngoj1 Thanks! Yes, that's the figure I was referring to.

Each curve represents a species temporal niche, so if they all line up and overlap a lot we would predict them not to coexist. So we need to both spread them out across the time axis with less overlap (like in Fig A). The shapes can differ some, but can you move them out -- maybe with some space at the end as there should be no species once the resource is depleted. Also, there should always be a full curve, since they represent individuals within a species and that would start from 0 and grow a little more slowly. I can also work on this in the adobe file if easier.

ngoj1 commented 8 months ago

Would something like this be more in line with what you were envisioning?

image

I tried to make them more skewed toward the left since that's the peak with the resource pulse but still have them distributed somewhat evenly across time, but not so much that they look exactly like the response curve with multiple pulses.

For comparison, the multiple pulse response: image

lizzieinvancouver commented 8 months ago

@ngoj1 Those look good for now! As I think through this more, I might ask for edits, but for now this works. Can you possibly make the curves using rnorm in R so they look a little more like perfect Gaussian curves (you can just make one and then change it to different shapes in Adobe)?

ngoj1 commented 8 months ago

I made a reference rnorm curve and just changed the colour and dimensions so that it overlaid on top of the graphs here, to get pdfs like this:

jornada_concept_abundance.pdf OPR_standardcurves.pdf

lizzieinvancouver commented 8 months ago

@ngoj1 Looks great! Can you work up a full 6-panel figure next?

ngoj1 commented 8 months ago

Hi Lizzie,

Here's a draft of the six panel figure. For the two bottom right figures I've left both the legend with species a to e and their corresponding colours AND also the individual species curves labelled so that you can pick which one you prefer. I've also left them in black for now (because I suspect the colour might make them hard to read) but I can change them to colour if you'd like.

Here I just pasted a png, but I've also saved it as .ai and .pdf files that I just pushed if you want to play around with the composition.

image

lizzieinvancouver commented 8 months ago

@ngoj1 Looks great! I am sure I will have tweaks to make as I work on the ms, but this looks great and hopefully I can make further edits myself (will let you know if not). Can you remind me what the data for the lower left panel is? I will add that to a caption soon before I forget.

ngoj1 commented 8 months ago

The lower left is soil moisture data from Jornada at 10 cm depth from measurement site 302 in 2018.