zoukankan      html  css  js  c++  java
  • ggplot2 练习杂记三 EXCEL 柱状图

     

    R代码

    ggplot(channel2,aes(x=factor(Name),,fill=Type))
    +geom_bar(aes(y=Amount,fill=factor(Type)),stat="identity"  ,width=0.3)
    +geom_bar(aes(y=Amount2,fill=factor(Type)),stat="identity" ,width=.2 ) #主要就是靠 width 的数字来控制的


    数据:

    Name Type  Amount   Amount2 
    A 期初库存                            842  
    A 采购                       96,907  
    A 销售                         94,541
    A 期末库存                           3,250
    B 期初库存                            493  
    B 采购                       58,210  
    B 销售                         58,321
    B 期末库存                              381
    C 期初库存                         1,215  
    C 采购                       56,999  
    C 销售                         54,540
    C 期末库存                           3,373
  • 相关阅读:
    2 3 5 7的倍数
    三角形面积
    数塔取数问题
    拼成最小的数
    JMeter使用总结
    jmeter+ant生成报告(ubuntu环境)
    LINUX常用命令,不定时更新
    oracle语句使用总结
    "the import org.junit can not be resolved"解决办法
    [SWPUCTF 2018]SimplePHP
  • 原文地址:https://www.cnblogs.com/LearningForR/p/4648883.html
Copyright © 2011-2022 走看看