BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mmea
Quartz | Level 8

Hi I have this sgplot 

1. how can I color the bars in the color steel

2. why does my refline not show 🙂

 

proc sgplot data = plot;
   vbarparm category = x response = y / datalabel datalabelattrs = (size = 10)barwidth=.9;
   yaxis min = 0 max = 1;
   format x date9. y percent.;
   xaxis display = (nolabel);
   yaxis display = (nolabel) MAX=1;
   refline 80/lineattrs=(thickness=1 color=black) label=("text");
   Title1 font = 'Calibri' height=16pt "text";
run;
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

You would use the FILLATTRS option on the Vbarparm to set a specific color such as
/ fillattrs=(color=steel)

View solution in original post

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

2) Because you attempt to draw the line at y = 80, but restrict the Y axis to 1. 

 

You want the REFLINE at Y = 0.8

 

data plot;
   x = today();
   y = .9;
run;

proc sgplot data = plot;
   vbarparm category = x response = y / datalabel datalabelattrs = (size = 10) barwidth=.9;
   yaxis min = 0 max = 1;
   format x date9. y percent.;
   xaxis display = (nolabel);
   yaxis display = (nolabel) MAX=1;
   refline 0.80 / lineattrs=(thickness=1 color=black) label=("text");
   Title1 font = 'Calibri' height=16pt "text";
run;
ballardw
Super User

You would use the FILLATTRS option on the Vbarparm to set a specific color such as
/ fillattrs=(color=steel)