Ron: That was exactly what I was looking for!

Thank you Ron!

Also thanks to Ulrik and Jim who tried to help. I learned a lot!

Dagmar


Am 15.07.2016 um 12:48 schrieb Crump, Ron:
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.



______________________________________________
R-help@r-project.org 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.

Reply via email to