[R] R bar chart

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Sat Sep 7 14:55:31 CEST 2019


Hello,

There is no attached file, R-help is doesn't allow many file types.
Try reposting with the extension .txt or post the output of


dput(head(dataset, 20))


directly in your e-mail.

Hope this helps,

Rui Barradas

Às 10:58 de 07/09/19, farshad goudarzian escreveu:
> Hello.
> Here I attach a microsoft excel data base file and plot image to illustrate
> my question.
> 
> 
> 
> my code:
> 
> ggplot(concretedata, aes(Company, Concrete, fill=
> Type))+geom_bar(stat="identity")
> 
> As per the attachment plot, the bar chart for different parameters
> (Concrete, Company and Type) is presented, but I dont know how to label
> each area of my bar plot.
> 
> for example, the bottom left area of my chart should show the sum of
> concrete provide by company A with type of C30 (16000 m3)
>   or the top right area of my plot should present the total concrete volume
> of company B with type of C25. (13000 m3)
> but I dont know how to show the total concrete of each area
> 
> I know  the command is "geom_text", but it doesnt show the sum of concrete
> volume, it shows all the numbers of concrete on top of each other.
> 
> thanks
> best regards
> ______________________________________________
> R-help using 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.
>



More information about the R-help mailing list