On 10/8/07, ONKELINX, Thierry <[EMAIL PROTECTED]> wrote:
> Hi Christophe,
>
> Although I'm a fan of ggplot2, it's lack of documentation is a drawback.
> I was having a similar problem and Hadley suggested the "sc$legend <-
> FALSE" solution. AFAIK it isn't documented (yet). Have a look at
> Hadley's website and the archive of this list for more documentation.

Yes, the documentation isn't great at the moment, but I am working on
it.  One reason why these two things (adding title and removing
legend) is that I'm still not sure that this is the right interface.

> This code adds a solid border to to bars. But I can't figure out how to
> add the main title to the plot (using ggplot instead of qplot).
>
> library(ggplot2)
> dow <- data.frame(dayofweek = factor(1:7), p = runif(7), w = c(0, 1, 1,
> 1, 1, 1, 0))
> sc <- scale_fill_continuous()
> sc$legend <- FALSE
> ggplot(data = dow, aes(x = dayofweek, y = p, fill = w), "t") +
> scale_x_discrete("Day") + scale_y_continuous("Arrival Rate") +
> geom_bar(colour = "black") + sc

You need to do

p <- ggplot(...) + ...
p$title <- "My title"

I'm planning on adding some methods to make this a bit easier (at
least less typing!) when using ggplot instead of qplot.

Hadley

-- 
http://had.co.nz/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to