如何在Stata的ROC曲线图上去除横向网格线并获得纯白背景
Stata ROC曲线纯白背景样式调整方案
你可以直接使用调整后的命令运行,即可满足三个样式需求:
roctab outcomedeath biomarkerlevel, binomial graph rlopts(lcolor(none) lpattern(shortdash)) ylabel(, nogrid) graphregion(fcolor(white) lcolor(white)) plotregion(fcolor(white) lcolor(black)) legend(on position(11) ring(0) bmargin(0) lstyle(none) fcolor(none))
各调整参数对应需求说明:
- 移除浅淡横向网格线:新增
ylabel(, nogrid)参数,可直接取消y轴默认生成的横向网格线,若需要同时移除x轴纵向网格,可额外追加xlabel(, nogrid)参数 - 移除绘图区域外的蓝色填充:新增
graphregion(fcolor(white) lcolor(white))参数,将绘图区外的画布背景设为纯白色并取消外围边框,搭配plotregion(fcolor(white) lcolor(black))保证绘图内部区域为纯白背景,仅保留标准坐标框 - 调整图例样式与位置:在legend参数内追加
position(11) ring(0) bmargin(0) lstyle(none) fcolor(none),其中position(11)对应右上角位置,lstyle(none)删除图例边框,fcolor(none)取消图例背景填充,ring(0)让图例嵌入绘图区域内部而非悬浮在画布外侧
内容的提问来源于stack exchange,提问作者ves
相关产品推荐
相关产品推荐

