Hi Dagmar,
<quote>
I want the names of the weeks on the x axis and the animals on the y-axis.
Then, the shading of the barplot is supposed to represent the number of
data
per week.
</quote>
If I understand the above correctly, and using the example dataset
constructed by Ulrik:
datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon"
+ ), week =c("1","2", "3", "1","2", "3"), numberdata =c(5,12, 1,
+ 6,2, 5))
I think this might do the job:
library(ggplot)
ggplot(datframe)+geom_tile(aes(x=week,y=Name,fill=numberdata))
Regards,
Ron.
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
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.