简体   繁体   中英

In a stacked bar plot,How do u plot bars of different categories of a variable (vertically) where every bar starts from x-axis?

http://www.bing.com/images/search?q=stacked+bar+chart&view=detailv2&id=CD8EFAE719BFA5FCA1AB1EA6DAA22363E76EAD13&selectedindex=1&ccid=lTsHf2uz&simid=608041385567914091&thid=OIP.M953b077f6bb366647d008eda5ec12aa7H0&mode=overlay&first=1

In the above picture, In match 9 team A scores 400 ( on score axis : 0-400), team B scores 90 (on score axis : 400-490) , team C scores 410 (490-900)

What should I do to get a bar diagram where I have all three teams scores bars starting from x axis for every match? (Bars of lower frequencies should be visible without being superimposed by high frequency ones)

like team A scores 400 ( on score axis : 0-400), team B scores 90 (on score axis : 0-90) , team C scores 410 (0-410)

Solution in R or excel is required

The best visualization solution for this lies in rCharts package

library(rCharts)

n1 <- nPlot(score ~ Match, group = "Team", data = player, type = "multiBarChart")
n1

If you want to publish on github, you can also do

n1$publish("Player", host = 'gist')

If you want to save as html

n1$save("Player.html")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM