Data visualization with SAS programming

How to replicate GPLOT output in SGPLOT?

Accepted Solution Solved
Reply
Regular Contributor
Posts: 198
Accepted Solution

How to replicate GPLOT output in SGPLOT?

Hi all,

I have produced the attached output ('sas_trend_saipe_state.jpg') below using the 'Graph-N-Go' Interface in SAS 9.2 M3.

Yet, when I used the code below

   title ;

   ODS Graphics on / ANTIALIAS=OFF ;

   PROC SGPLOT data=work.saipesnc_s;

      series x=year y=saepovrtall_pt / group=name lineattrs=(thickness=2);

      yaxis grid valueshint;

      xaxis grid valueshint;

   run;

   quit;

The attached output 'SGPlot4.png' is different!! There are no cut-off!?

What am I doing wrong? How can I show the desired Cut-Off in my joined lines?

Thanks,

Ahmed

Attachment
Attachment

Accepted Solutions
Solution
‎05-14-2014 12:20 PM
Grand Advisor
Posts: 9,748

Re: How to replicate GPLOT output in SGPLOT?

BREAK as an option on Series plot will create a skip if there is no data. I'd add a datapoint for year = 2004.5 with missing values for the y value in each group and use that option.

There may be other options in versions after th 9.2 I have.

View solution in original post


All Replies
Solution
‎05-14-2014 12:20 PM
Grand Advisor
Posts: 9,748

Re: How to replicate GPLOT output in SGPLOT?

BREAK as an option on Series plot will create a skip if there is no data. I'd add a datapoint for year = 2004.5 with missing values for the y value in each group and use that option.

There may be other options in versions after th 9.2 I have.

Post a Question
Discussion Stats
  • 1 reply
  • 245 views
  • 0 likes
  • 2 in conversation