如何在Stata中的同一张图上叠加多个图?
我正在使用以下代码在Stata中的图表上绘制绘图。我想在同一张图上绘制多个图。这可能吗?谁能告诉我该怎么办?
我想要做的是在同一个图表中绘制以下类型的多个图。
进一步说明:每个 X 值都有多个均值和 CI,即每个模拟模型都有一个均值和 CI。一个仿真模型的所有手段和 CI 将连接在一起。
clear
input str2 varname mean upper lower
x1 30 25 35
x2 50 20 80
x3 60 50 70
x4 60 55 65
x5 65 55 75
end
encode varname, gen(varname1)
scatter mean varname1, xlabel(, valuelabel) || rcap upper lower varname1 || line upper mean lower varname1
I am using the following code for drawing a plot on a graph in Stata. I want to draw multiple plots on the same graph. Is that possible? Can anyone kindly tell me what to do?
What I want to do is to have multiple plots of the following types in the same graph.
Further clarification: There will be multiple means and CIs for each value of X, i.e. one mean and CI for each simulation model. All the means and CIs for one simulation model will be connected together.
clear
input str2 varname mean upper lower
x1 30 25 35
x2 50 20 80
x3 60 50 70
x4 60 55 65
x5 65 55 75
end
encode varname, gen(varname1)
scatter mean varname1, xlabel(, valuelabel) || rcap upper lower varname1 || line upper mean lower varname1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 @whuber 善意提到的,我们需要使用
||
来绘制更多东西。我使用以下代码在同一张图表上绘制了多个我需要的类型的图。谢谢。As @whuber kindly mentioned, we need to use
||
to draw more things. I used the following code to draw more than one plot of the type I need on the same graph. Thanks.