[R] Legend Truncated Using filled.contour
dwinsemius at comcast.net
Thu Oct 4 05:35:30 CEST 2012
On Oct 3, 2012, at 12:58 PM, Kirsten wrote:
> Hey everyone,
> I'm working on a contour plot depicting asymptomatic prevalence at varying
> durations of infectiousness and force of infection. I've been able to work
> everything out except for this one - my legend title keeps getting cut off.
> Here's what I have:
Error in nrow(asym_matrix) : object 'asym_matrix' not found
> color = function(x)rev(heat.colors(x)),
> plot.title = title(main="Asymptomatic Prevalence in 0-4 Year Olds with\n
> Increasing Duration of Infectiousness",
> xlab = "Duration of Infectiousness",
> ylab = "Relative Force of Infection"),
> key.title = title(main = "Asymptomatic\n Prevalence"))
> My first thought was to make the legend title text smaller using cex = 0.75
> (or similar), but it doesn't change the text size at all. In fact, none of
> the modifiers that I've tried to add to the key.title line (size, color,
> font, etc) seems to be making a bit of difference.
> key.title = title(main = "Asymptomatic\n Prevalence", cex = "0.75")
> I assume there's an override earlier in the code, but I have no idea what it
> is. Any suggestions?
> View this message in context: http://r.789695.n4.nabble.com/Legend-Truncated-Using-filled-contour-tp4644938.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
Alameda, CA, USA
More information about the R-help