05-04-2016 09:09 PM
I try to plot graph using PROC GPLOT:
PROC GPLOT DATA = lead1; footnote j=l 'curve' j=r 'MAT 4672 Lab 21'; plot iqf*fwtd=3/ frame cframe=beige;; RUN; QUIT;
and i got this
How make it nice and sorted.
I tried that
PROC SORT data = lead1; by fwtd; run; PROC GPLOT DATA = lead1; footnote j=l 'curve' j=r 'MAT 4672 Lab 21'; plot iqf*fwtd=3/ frame cframe=beige;; RUN; QUIT;
and got that:
05-04-2016 10:04 PM
05-04-2016 10:39 PM
Yeah, I don't think 3 does what you think it does. I can't test it, but I think you want something like this, where you use the symbol statement to define the symbol (square) and the interpol=j to join the points.
symbol1 interpol=j value='square'; PROC GPLOT DATA = lead1; footnote j=l 'curve' j=r 'MAT 4672 Lab 21'; plot iqf*fwtd / frame cframe=beige;; RUN; QUIT;
Alternatively you can use the SGPLOT procedures which I find easier to navigate:
proc sgplot data=sashelp.stocks (where=(stock="IBM")); scatter x=date y=open / markerattrs=(symbol='square' color='beige'); series x=date y=open / lineattrs=(color='beige'); run;quit;
05-05-2016 11:33 AM
1)3 means squares instead just dots
2) i am expecting graph through all points(squares) and sorted by X axis like
3 means to use Symbol3 statement for the display. Yours has some sort of interpolation option (INTERPOL= or I=) other than JOIN to "fit" a curve through the data. I would guess either SM Spline or L.
If you want to connect the points you need I=Join.
05-05-2016 04:29 AM
I would suggest 1) move over to sgplot and graph template language, you will find more options/better outputs and 2) check out Sanjay's blog:
Which has many thousands of examples on all kinds of graphs, you will find what you are looking for there.