Skip to content
Prev 318348 / 398502 Next

ggplot2 Increase font size

Are you sure you didn't get you threads mixed up? Your original
question was about changing font size and background colors...

See inline for answers to this new question.
On Tue, Feb 26, 2013 at 12:45 PM, Alaios <alaios at yahoo.com> wrote:
Translating from English:
to R:

tdm <- within(tdm,{
  value <- ifelse(value < 0, 0, value)
  value <- ifelse(value > 1, 1, value)
  value <-factor(round(value, digits=1), levels=seq(0, 1, by=.1))
})

ggplot(tdm, aes(x = Var2, y = Var1, fill = value)) +
  labs(x = "MHz", y = "Threshold", fill = "Duty Cycle") +
  geom_raster(alpha=1) +
  scale_fill_discrete(h.start=1, drop=FALSE) +
  scale_x_continuous(expand = c(0, 0)) +
  scale_y_continuous(expand = c(0, 0))
tdm <- within(tdm,{
  value <- ifelse(value < 0, 0, value)
  value <- ifelse(value > 1, 1, value)
  value <-factor(round(value, digits=1))
})
because the breaks on your discrete scale don't match the actual
levels of your data...

If I change it like that.
So categorize your data properly.
Not sure, but what I don't understand is why you're following up to a
question about font sizes and background colors with a question about
factor levels.

Best,
Ista