What I really want to do is plot a histogram, with the y-axis on a log-scale. Obviously this i a problem with the ggplot2
geom_histogram
, since the bottom os the bar is at zero, and the log of that gives you trouble.
My workaround is to use the freqpoly geom
, and that more-or less does the job. The following code works just fine:
ggplot(zcoorddist) +
geom_freqpoly(aes(x=zcoord,y=..density..),binwidth = 0.001) +
scale_y_continuous(trans = 'log10')
The issue is that at the edges of my data, I get a couple of garish vertical lines that really thro you off visually when combining a bunch of these freqpoly curves in one plot. What I'd like to be able to do is use points at every vertex of the freqpoly curve, and no lines connecting them. Is there a way to to this easily?