SAS referenceline dropline

dropto = x 从某点向X轴作垂线

referenceline 参考线,水平或者垂直

 

ods html;

proc template;
define statgraph _referenceDropline;
    begingraph;
        layout overlay / xaxisopts = (griddisplay = on) yaxisopts = (griddisplay = on);
            scatterplot x = horsepower y = mpg_city;
            referenceline y = 22 / curvelabel = 'Mpg = 23' curvelabellocation = inside;
            dropline x = 200 y = 30 / label = "(200,30)" dropto = x lineattrs = (pattern = dash);
            dropline x = 200 y = 30 / label = "(200,30)" dropto = y lineattrs = (pattern = dash);
        endlayout;
    endgraph;
end;
run;

proc sgrender data = sashelp.cars(where = (type = "Sedan")) template = _referenceDropline;
run;

 

 

posted @ 2021-10-05 22:12  Iving  阅读(583)  评论(0编辑  收藏  举报