Skip to content
Back to formatted view

Raw Message

Message-ID: <loom.20080305T095703-498@post.gmane.org>
Date: 2008-03-05T09:59:41Z
From: Ingo Michaelis
Subject: main title x title and y title with ggplot2

ONKELINX, Thierry <Thierry.ONKELINX <at> inbo.be> writes:

> 
> Guillaume,
> 
> You'll have to add the appropriate scales. 
> 
> ggplot(data, aes(x,y,fill)) + geom_point() + scale_x_continuous("your
> xlabel") + scale_y_continuous("your ylabel")
> 
> I suppose you can add a main title in a similar way, but I haven't found
> that yet. But I shure that Hadley will answer this.
> 
> Thierry

Guillaume,

I had the same problem and found a solution in some forums. Try this:

p<-ggplot(data, aes(x,y,fill)) + geom_point() + scale_x_continuous("your
xlabel") + scale_y_continuous("your ylabel")

p$title<-"your title"

print(p)

Ingo.