Re: [R] ggplot

From: Ista Zahn <izahn_at_psych.rochester.edu>
Date: Fri, 22 Apr 2011 10:19:40 -0400

Hi Alaios,
I don't see how the error message could be any clearer. You must specify the labels for geom_text.

Best,
Ista

On Fri, Apr 22, 2011 at 7:27 AM, Alaios <alaios_at_yahoo.com> wrote:
> Hello everyone,
>
> I am using ggplot
>
> to plot but I am getting the following error which I do not understand
>
> Error: geom_text requires the following missing aesthetics: label
>
>
> My code is
>  dimx<-256
>
>  library(ggplot2)
>  dev.new()
>  xandy<-expand.grid(seq(1:dimx),seq(1:dimy))
>  xx<-data.frame(xandy[[1]],xandy[[2]],Powermap=Powermap)
>  subsetxx<-subset(xx, xx$Powermap>threshold)
>
>  ggplot( (subsetxx ) )+
>  geom_point(aes(x,y,colour=cut(Powermap,c(0,-1,-10,-20,-30,-40,-50,-60,-70,-80,-90,-100,-110))))+
>  geom_text(aes(x,y,color=cut(Powermap, c(0,-1,-10,-20,-30,-40,-50,-60,-70,-80,-90,-100,-110)), label=round(Powermap,3)),vjust=1,legend=FALSE)+labs(colour="Powermap")+
>  coord_cartesian(xlim = c(1, dimx),ylim = c(1, dimy))
>
> ______________________________________________
> R-help_at_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.
>

-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org

______________________________________________
R-help_at_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.
Received on Fri 22 Apr 2011 - 14:24:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 22 Apr 2011 - 14:40:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive