@xiaolufan wrote:
Is this correct?
Nope. Please check the documentation for examples on the use of the procedures.
http://support.sas.com/documentation/cdl/en/grstatproc/67909/HTML/default/viewer.htm#n06fb9ichgg6akn18060gbtvw9pw.htm
In your case, it looks like a basic scatter plot.
The code is a bit more intuitive in SGPLOT in my opinion. Also, my recommendation, especially when learning is to always specify the DATA statement on your procs to denote what data source you're using.
proc sgplot data=sashelp.class;
scatter x=height y=weight;
run;
... View more