Data visualization with SAS programming

Adding the symbol into the keylegend?

Reply
Contributor
Posts: 24

Adding the symbol into the keylegend?

I have the following code which gives me the plot I want. However the legend only shows the lines rather than the symbols produced with the outlierAttrs.

I can obviously remove the lineattrs pattern to show the dotted lines which will be represented in the lines but that gives me more of an issue as some of the lines are short.

proc sgplot data=all sganno=Line;

  vbox aval / group=trtan category=ady nofill boxwidth=0.5  name="series" lineATTRS=(pattern=solid)

              whiskerATTRS=(pattern=solid) outlierATTRS=(size=5) nomean nocaps

              groupdisplay=cluster grouporder=data clusterwidth=0.4;

  yaxis label="Label(units)" labelattrs=(size=9) ;* min=90 max=140;

  xaxis label="Nominal time (h)"  values=(0 1 2 3 4 8) offsetmin=0.1 offsetmax=0.1;

  format ady tick.;

  keylegend "series" / across=1 down=3 noborder title="" position=topright location=inside

;

run;

Ive attached the output. Any clue would be appreciated.

Thanks

Adrienne M Bonwick

Ask a Question
Discussion stats
  • 0 replies
  • 278 views
  • 0 likes
  • 1 in conversation