Closed LHMarshall closed 8 years ago
in addition, replace all 6 plot titles because they are same as y-axis labels. Instead have centre plot (top) with title "Line transects" and centre bottom "Point transects"
Ah yes... hadn't realised that wasn't on the list... it was in my head :-) @erex is this ok? I just used the main of the middle plot to add the titles... I could investigate the grid package. I have also updated the figure caption to reflect these changes (and removed the reference to 'composite function' as that term has disappeared from the text).
I think that title looks fine. I wonder what's happening with the x-axis ticks for the leftmost plots?
Fixed... not sure what I was trying there with axp...
something about 'arbitrary distances' in the caption?
Does this sound ok?
Top panels show an example detection function (left), the pdf of object distances (middle) and the resulting pdf of detection distances (right) for line transects out to an arbitrary distance of 500. Bottom panels show an example detection function (left), the pdf of object distances (middle) and the resulting pdf of detection distances (right) for point transects out to an arbitrary distance of 500.
I would make a separate sentence saying "Distances shown on x-axis for all plots are arbitrary."
Just add it to the end? I feel the urge to link it with the word 'Note, distances...'
Top panels show an example detection function (left), the pdf of object distances (middle) and the resulting pdf of detection distances (right) for line transects. Bottom panels show an example detection function (left), the pdf of object distances (middle) and the resulting pdf of detection distances (right) for point transects. The pdf of observed detection distances in the right hand plots are obtained by multiplying the detection function by the pdf of object distances. Distances shown on x-axis for all plots are arbitrary.
up to you, happy either way
How about the following -- no offense if you dont' go for it!
Panels show an example detection function (left), the pdf of object distances (middle) and the resulting pdf of detection distances (right) for line transects (top row) and point transects (bottom row). The pdf of observed detection distances in the right hand plots are obtained by multiplying the detection function by the pdf of object distances and rescaling. In this example, detection probability becomes effectively zero at 500m.
I suggested the re-wording to the last sentence because we don't want to make it appear that you can just put arbitrary distances there! We meet we chose them quite arbitrarily, and I hope my suggestion conveys that in a nice way.
Note
Thanks for putting this together @LHMarshall! Looks good.
@lenthomas, so your point above: We could do the above adjustment without reference to metres? "In this example, detection probability becomes effectively zero at a distance of 500." (or "500 units")?
Agree y axis tick marks are necessary for middle and right.
Fine by me. Laura, I recon you can choose since it's your figure!
It'll take me a little while to figure out the tick marks (or rather the values for the tick marks) ... will try to get it done by Monday. Then these values are reliant on the arbitraty end point of the x axis too
I was on a roll (i.e., avoiding other problems) so I fixed this in 5f94f63.
Erm... not quite that simple Dave I don't think. If these are a pdfs they should integrate to 1 right? I just made the plots look like they should the values are not consistent with being a pdf they need rescaled.
Oh damn, sorry, I misread that. I have code for this though, so I'll take a look unless you already started?
On 18/03/2016 16:26, Laura Marshall wrote:
Erm... not quite that simple Dave I don't think. If these are a pdfs they should integrate to 1 right? I just made the plots look like they should the values are not consistent with being a pdf they need rescaled.
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/dill/distance-package-paper/issues/39#issuecomment-198528503
I'm working on it
Okay great, I'll leave that alone then!
On 18/03/2016 16:32, Laura Marshall wrote:
I'm working on it
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/dill/distance-package-paper/issues/39#issuecomment-198530648
Hi @dill , github is not happy with me...
Can you paste the following code into Figure 1 please. Thanks
par(mfrow=c(2,3))
hn.detect <- function(x, sigma){ hn <- exp(-((x^2)/(2*(sigma^2)))) return(hn) } hn.detect.scaled <- function(x, sigma){ return(hn.detect(x,sigma)/integrate(hn.detect, 0, 500, sigma = sigma)$value) }
x <- seq(0,500, length = 100) y <- hn.detect(x, sigma = 200) y.scaled <- hn.detect.scaled(x, sigma = 200)
set.cex = 1 set.cex.lab = 1.2 set.cex.main = 2
plot(x, y, xlab = "Perpendicular distance", ylab = "Probability of detection", type = "l", ylim = c(0,1.1), cex = set.cex, cex.lab = set.cex.lab) line.availability <- rep(0.002,100) plot(x, line.availability, xlab = "Perpendicular distance", ylab = "pdf of object distances", type = "l", ylim = c(0,0.0022), xlim = c(0,500), cex = set.cex, cex.lab = set.cex.lab, main = "Line Transect", cex.main = set.cex.main) plot(x,y.scaled, xlab = "Perpendicular distance", ylab= "pdf of observed distances", type = "l", ylim = c(0,0.0044), cex = set.cex, cex.lab = set.cex.lab)
plot(x, y, xlab = "Radial distance", ylab = "Probability of detection", type = "l", ylim = c(0,1.1), cex = set.cex, cex.lab = set.cex.lab)
point.area <- function(x){ return(2_pi_x) } point.availability <- 2_pi_x/integrate(point.area, 0, 500)$value
plot(x, point.availability, xlab = "Radial distance", ylab = "pdf of object distances", type = "l", ylim = c(0,0.0044), xlim = c(0,500), cex = set.cex, cex.lab = set.cex.lab, main = "Point Transect", cex.main = set.cex.main)
point.observed.shape <- function(x, sigma){ value <- 2_pi_x*hn.detect(x, sigma) } pdf.point.observed <- function(x, sigma){ point.observed.shape(x, sigma = sigma)/integrate(point.observed.shape, 0, 500, sigma = sigma)$value }
pdf.observed <- pdf.point.observed(x, sigma = 200)
plot(x, pdf.observed, xlab = "Radial distance", ylab= "pdf of observed distances", type = "l", ylim = c(0,0.00345), cex = set.cex, cex.lab = set.cex.lab)
Thanks Laura!
Done (with slight modifications) c84d0df.
On 18/03/2016 16:59, Laura Marshall wrote:
par(mfrow=c(2,3))
line and point transect examples
hn.detect <- function(x, sigma){ hn <- exp(-((x^2)/(2*(sigma^2)))) return(hn) } hn.detect.scaled <- function(x, sigma){ return(hn.detect(x,sigma)/integrate(hn.detect, 0, 500, sigma = sigma)$value) }
x <- seq(0,500, length = 100) y <- hn.detect(x, sigma = 200) y.scaled <- hn.detect.scaled(x, sigma = 200)
set.cex = 1 set.cex.lab = 1.2 set.cex.main = 2
Line transect example
plot(x, y, xlab = "Perpendicular distance", ylab = "Probability of detection", type = "l", ylim = c(0,1.1), cex = set.cex, cex.lab = set.cex.lab) line.availability <- rep(0.002,100) plot(x, line.availability, xlab = "Perpendicular distance", ylab = "pdf of object distances", type = "l", ylim = c(0,0.0022), xlim = c(0,500), cex = set.cex, cex.lab = set.cex.lab, main = "Line Transect", cex.main = set.cex.main) plot(x,y.scaled, xlab = "Perpendicular distance", ylab= "pdf of observed distances", type = "l", ylim = c(0,0.0044), cex = set.cex, cex.lab = set.cex.lab)
Point Transect example
plot(x, y, xlab = "Radial distance", ylab = "Probability of detection", type = "l", ylim = c(0,1.1), cex = set.cex, cex.lab = set.cex.lab)
point.area <- function(x){ return(2/pi/x) } point.availability <- 2/pi/x/integrate(point.area, 0, 500)$value
plot(x, point.availability, xlab = "Radial distance", ylab = "pdf of object distances", type = "l", ylim = c(0,0.0044), xlim = c(0,500), cex = set.cex, cex.lab = set.cex.lab, main = "Point Transect", cex.main = set.cex.main)
point.observed.shape <- function(x, sigma){ value <- 2/pi/x*hn.detect(x, sigma) } pdf.point.observed <- function(x, sigma){ point.observed.shape(x, sigma = sigma)/integrate(point.observed.shape, 0, 500, sigma = sigma)$value }
pdf.observed <- pdf.point.observed(x, sigma = 200)
plot(x, pdf.observed, xlab = "Radial distance", ylab= "pdf of observed distances", type = "l", ylim = c(0,0.00345), cex = set.cex, cex.lab = set.cex.lab)
Great
Actually one thing I was going to say @dill is that you may want to play around with the values on the tick marks... can you round them? middle plot top row looks odd. There are a number of redundant looking 0's
Ah yeah, I see that. On my list.
On 18/03/2016 17:12, Laura Marshall wrote:
Actually one thing I was going to say @dill https://github.com/dill is that you may want to play around with the values on the tick marks... can you round them? middle plot top row looks odd
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/dill/distance-package-paper/issues/39#issuecomment-198543592
What do you think of b857407?
On 18/03/2016 17:12, Laura Marshall wrote:
Actually one thing I was going to say @dill https://github.com/dill is that you may want to play around with the values on the tick marks... can you round them? middle plot top row looks odd
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/dill/distance-package-paper/issues/39#issuecomment-198543592
The horizontal line looks a bit too close to the top of the plot (top middle). There is a way to get round it if you can't simply round and that is to take off the axis at the plot stage then put it back on giving it the tick locations and labels explcitly...
This looks much better, thanks Laura.
Leave 500 on the x-axis but remove metres and add in note to say this is an arbitrary distance
Central plots: pdf of object distances
Right hand plots: pdf of observed distances
use grid package?