楼主: 小木鱼2007
28538 9

[作图问题求助] stata 如何作出双y轴柱状图+折线图画法?谢谢各位高手!(如下图所示) [推广有奖]

  • 21关注
  • 6粉丝

已卖:40份资源

副教授

34%

还不是VIP/贵宾

-

威望
1
论坛币
6823 个
通用积分
87.8427
学术水平
15 点
热心指数
32 点
信用等级
13 点
经验
53334 点
帖子
325
精华
0
在线时间
728 小时
注册时间
2010-4-22
最后登录
2025-12-14

楼主
小木鱼2007 发表于 2014-5-26 18:27:20 |AI写论文
50论坛币

2014-05-26_182030.png (3.86 KB)

2014-05-26_182030.png

最佳答案

hplcdadong 查看完整内容

sysuse sp500, clear gen month=month(date) collapse high low volume close, by(month) gen month1=month-0.2 gen month2=month+0.2 twoway (bar high month1,barw(0.4)) (scatter volume month,msymbol(S) connect(l) yaxis(2)) /// (bar low month2, barw(0.4)), xlabel(1(1)12)
关键词:Stata tata 折线图 柱状图 如何 柱状图

回帖推荐

hplcdadong 发表于2楼  查看完整内容

sysuse sp500, clear gen month=month(date) collapse high low volume close, by(month) gen month1=month-0.2 gen month2=month+0.2 twoway (bar high month1,barw(0.4)) (scatter volume month,msymbol(S) connect(l) yaxis(2)) /// (bar low month2, barw(0.4)), xlabel(1(1)12)
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
18909050882 + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

沙发
hplcdadong 发表于 2014-5-26 18:27:21
sysuse sp500, clear
gen month=month(date)
collapse  high low volume close, by(month)
gen month1=month-0.2
gen month2=month+0.2

twoway  (bar high month1,barw(0.4)) (scatter volume month,msymbol(S) connect(l) yaxis(2))   ///
(bar low month2, barw(0.4)), xlabel(1(1)12)
已有 2 人评分学术水平 热心指数 信用等级 收起 理由
陈罗炜 + 1 + 1 + 1 精彩帖子
小木鱼2007 + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 2  热心指数 + 2  信用等级 + 2   查看全部评分

藤椅
小木鱼2007 发表于 2014-5-27 05:23:20
非常感谢!

板凳
8wy008089 发表于 2014-6-11 22:32:28
hplcdadong 发表于 2014-5-26 18:27
sysuse sp500, clear
gen month=month(date)
collapse  high low volume close, by(month)
牛人!

报纸
nchxg 发表于 2015-6-13 18:23:08
very  nice  

地板
mumu爱老虎油 发表于 2016-2-26 23:36:29
双y轴柱状图~~~~~~~~~~

7
mingxc188 发表于 2017-3-24 19:50:45
人才啊

8
听雨廊桥 学生认证  发表于 2017-6-6 11:26:50
必须要赞一个

9
caozhaowen 在职认证  发表于 2018-4-15 22:02:21
hplcdadong 发表于 2014-5-26 18:27
sysuse sp500, clear
gen month=month(date)
collapse  high low volume close, by(month)
如果不用collapse,可不可以画均值折线图呢?用这个命令有点麻烦。

10
yan_wenhong 学生认证  发表于 2018-9-23 20:23:59
hplcdadong 发表于 2014-5-26 18:27
sysuse sp500, clear
gen month=month(date)
collapse  high low volume close, by(month)
非常感谢,我略加修改就适用我的论文了。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-27 04:23