How do I correct this simple mista

Accepted Solution Solved
Reply
Super Contributor
Posts: 303
Accepted Solution

How do I correct this simple mista

When I plot thes plots, the name on the plot suppose to be " Plot _SENSIT_A      _SENSIT_B" however I am getting " Plot sensitivity      _SENSIT_B.

How do I correct it?

GOPTIONS reset=all cback=white border;

DATA new;

INPUT _SENSIT_A _SENSIT_B SPEC ;

_1MSPEC_ =1-SPEC;

CARDS;

1 1 0

.98 .95 0.1

.97  .91  .2

.95 .88 .3

.87  .70 .5

.70  .4 .7

.55 .30 .8

.1 0.1 1

;

DATA anno;

FUNCTION='move'; xsys='1'; ysys='1'; x=0; y=0; OUTPUT;

FUNCTION='draw'; xsys='1'; ysys='1'; color='red'; x=100; y=100; OUTPUT;

RUN;

PROC GPLOT data=new;

proc gplot data=new;

   plot _SENSIT_A*_1MSPEC_  _SENSIT_B*_1MSPEC_ / overlay legend=legend1

                             vref=0 to 1 by .1

                             lvref=2

                             haxis=axis1 hminor=1

                             vaxis=axis2 vminor=2;

symbol2 i=join v=dot c=red line=2;

SYMBOL1 i=j v=dot c=black;

AXIS1 length=5 in;

AXIS2 length=5 in;

LABEL _SENSIT_A ='Sensitivity';

LABEL _1MSPEC_='1 - Specificity';

run;ke on the plote


Accepted Solutions
Solution
‎04-09-2014 09:36 AM
SAS Super FREQ
Posts: 3,753

Re: How do I correct this simple mista

Posted in reply to desireatem

You used the LABEL statment to add a label for the _SENSIT_A variable, so that label is being used for the legend.  You should post questions like this to the SAS/GRAPH Support Community: https://communities.sas.com/community/support-communities/sas_graph_and_ods_graphics

If you are interested in learning the modern ODS statistical graphics, here is how to create the plot with PROC SGPLOT:

title "Comparison of Models A and B";

PROC SGPLOT data=new;

label _SENSIT_A="A" _SENSIT_B="B";

series x=_1MSPEC_ y=_SENSIT_A / markers;

series x=_1MSPEC_ y=_SENSIT_B / markers;

xaxis label = '1 - Specificity';

yaxis label = 'Sensitivity' grid;

run;

View solution in original post


All Replies
Solution
‎04-09-2014 09:36 AM
SAS Super FREQ
Posts: 3,753

Re: How do I correct this simple mista

Posted in reply to desireatem

You used the LABEL statment to add a label for the _SENSIT_A variable, so that label is being used for the legend.  You should post questions like this to the SAS/GRAPH Support Community: https://communities.sas.com/community/support-communities/sas_graph_and_ods_graphics

If you are interested in learning the modern ODS statistical graphics, here is how to create the plot with PROC SGPLOT:

title "Comparison of Models A and B";

PROC SGPLOT data=new;

label _SENSIT_A="A" _SENSIT_B="B";

series x=_1MSPEC_ y=_SENSIT_A / markers;

series x=_1MSPEC_ y=_SENSIT_B / markers;

xaxis label = '1 - Specificity';

yaxis label = 'Sensitivity' grid;

run;

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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