sas sgplot refline
时间: 2023-12-28 16:05:34 浏览: 30
SAS SGPlot procedure is used for creating various types of statistical graphics such as scatter plots, line plots, histograms, and more. The REFLINE statement in SAS SGPlot procedure is used to draw a reference line on a plot.
Here is an example of how to use the REFLINE statement in SAS SGPlot:
```
proc sgplot data=mydata;
scatter x=xvar y=yvar / markerattrs=(symbol=circlefilled);
refline 0 / axis=x lineattrs=(color=red);
run;
```
In this example, the scatter plot of `xvar` vs `yvar` is created using the `SCATTER` statement. The `REFLINE` statement is then used to draw a reference line at `y=0` using the `0` option and specify the `X` axis using the `AXIS=X` option. The color of the reference line is set to red using the `LINEATTRS` option.
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)