[R] ggplot2-barplot

From: Felipe Carrillo <mazatlanmexico_at_yahoo.com>
Date: Sun, 22 Jun 2008 17:09:10 -0700 (PDT)

Hi all:
I have been using ggplot2 graphics for quite some time now and I really like it. However, I haven't used barplots enough to understand the arquitecture behind it. Can someone show me how to make this simple barplot graph with ggplot2? I want "PondName" along the x axis and "avgWt" along the Y axis which represents the avgWt by each Pond.

PondName	avgWt
Pond01	21.5
Pond02	17.8
Pond03	17.8
Pond04	17.8
Pond05	16.375
Pond06	21.5
Pond07	21.5

Using sigmaplot or Excel is a simple task but I can't get it to work with ggplot2. I was trying:

qplot(PondName,data=mydata,geom="bar") + geom_bar(fill=factor(PondName)) but I don't get the desired results. Thanks



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 Mon 23 Jun 2008 - 01:17:28 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 Mon 23 Jun 2008 - 09:31:12 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