midpoints issue

Reply
Contributor kds
Contributor
Posts: 31

midpoints issue

Hello Experts,

I am facing two problems running below code:

data XY;

input period val1 val2;

datalines;

1996 1120 1

1997 1100 2

1998 1030 3

1999 1180 3

2000 1123 .

;

run;

axis3 offset=(2) v=( "START"  ""  "MID"  ""  "END" ) label=none;

proc gbarline data=XY;

bar period /discrete sumvar=val2  maxis=axis3 missing;

plot /sumvar=val1;

run;

quit;

1) I am unable to get X-values as     "START"   " "     "MID"      "  "      "END".       It is displaying  -->    "START"   "1997"     "MID"      "1999 "     

2) the midpoint for missing value is not getting displayed even after using MISSING option.

Please help...

Respected Advisor
Posts: 3,799

Re: midpoints issue

You need another option ORDER

data XY;
   input period val1 val2;
  
datalines;
1996 1120 1
1997 1100 2
1998 1030 3
1999 1180 3
2000 1123 .
;
run;

axis3
/*   offset=(2) */
  
value=("START"  " "  "MID"  " "  "END" )
  
order=(1996 to 2000)
  
label=none;

proc gbarline data=XY;
   bar period /discrete sumvar=val2  maxis=axis3 missing;
  
plot /sumvar=val1;
   run;
  
quit;
Contributor kds
Contributor
Posts: 31

Re: midpoints issue

Posted in reply to data_null__

Thanks a lot DATA_NULL_ for resolving my 2nd problem...  Inclusion of order shows the null midpoint....

However, for the first problem

it still shows -->     "START"   "1997"     "MID"      "1999 "   "END"

that is 1997 and 1999 are not getting replaced by blanks or spaces.....

Contributor kds
Contributor
Posts: 31

Re: midpoints issue

Posted in reply to data_null__

First issue also got resolved...I didn't use the reset  earlier...

After using the reset, the first issue also got resolved.

Thanks again... DATA_NULL_   Smiley Happy

Ask a Question
Discussion stats
  • 3 replies
  • 277 views
  • 0 likes
  • 2 in conversation