BookmarkSubscribeRSS Feed
Charles
Calcite | Level 5

Hello,

I am trying to do the following using gplot instead of sgplot. Can you help me?

Many thanks!

/* Plot proportions versus sample size. Overlay control limits */

proc sgplot data=Funnel;

band x=N lower=L3sd upper=U3sd / nofill lineattrs=(color=lipk)

     legendlabel="99.8% limits" name="band99";

band x=N lower=L2sd upper=U2sd / nofill lineattrs=(color=gray) 

     legendlabel="95% limits" name="band95";

refline &AvgProp / axis=y;

scatter x=Trials y=Proportion;

keylegend "band95" "band99" / location=inside

     position=bottomright;

yaxis grid values=(0.3 to 1 by 0.1); xaxis grid;

run;

1 REPLY 1
DanH_sas
SAS Super FREQ

The code below is about as close as you're going to get. It's something missing in sgplot that prevents you from getting what you want?

symbol1 i=join color=lipk;

symbol2 i=join color=gray;

symbol3 i=none value=circle;

axis1 order=0.3 to 1 by 0.1;

proc gplot data=funnel;

plot U3sd*n=1 L3sd*n=1 U2sd*n=2 L2sd*n=2 Proportion*trials=3 / overlay

    vref=(&AvgProp) grid legend vaxis=axis1;

run;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1134 views
  • 0 likes
  • 2 in conversation