Here is an example that illustrates my problem:
If I change the array to 10 items, it looks ok. But with 18 the text get too small.
If I change the ypixels to 1000 the graph gets bigger but not the legend.
goptions dev =javaimg xpixels=640 ypixels=480;
data fmt;
fmtname = '$ATCFMT';
length label $160;
start="0 ";end= "0 ";label="saknas ";output;
start="A ";end= "A ";label="MATSMALTNINGSORGAN OCH AMNESOMSATTNING ";output;
start="B ";end= "B ";label="BLOD OCH BLODBILDANDE ORGAN ";output;
start="C ";end= "C ";label="HJARTA OCH KRETSLOPP ";output;
start="D ";end= "D ";label="HUD ";output;
start="G ";end= "G ";label="URIN- OCH KONSORGAN SAMT KONSHORMONER ";output;
start="H ";end= "H ";label="HORMONER EXKL KONSHORMONER ";output;
start="J ";end= "J ";label="INFEKTIONSSJUKDOMAR ";output;
start="L ";end= "L ";label="TUMORER OCH RUBBNINGAR I IMMUNSYSTEMET ";output;
start="M ";end= "M ";label="RORELSEAPPARATEN ";output;
start="N ";end= "N ";label="NERVSYSTEMET ";output;
start="P ";end= "P ";label="ANTIPARASITARA, INSEKTSDODANDE OCH REPEL ";output;
start="Q ";end= "Q ";label="gentamycin,betametazon,klotrimazol ";output;
start="R ";end= "R ";label="ANDNINGSORGANEN ";output;
start="S ";end= "S ";label="OGON OCH ORON ";output;
start="T ";end= "T ";label="DIALYSVAROR (ASF) ";output;
start="U ";end= "U ";label="ISOTOPER (ASF) ";output;
start="V ";end= "V ";label="VARIA ";output;
start="W ";end= "W ";label="TILLFALLIGA HANDELSVAROR ";output;
start="X ";end= "X ";label="HANDELSVAROR ";output;
start="Y ";end= "Y ";label="FORBRUKNINGSARTIKLAR ";output;
start="Z ";end= "Z ";label="TILLBEHOR ";output;
run;
data b;
set fmt;
start = compress(start);
end = compress(end);
label = strip(label);
run;
proc format cntlin = b;
run;
data test(keep = sex2 value height);
set sashelp.class;
length sex2 $160;
array kon (18) $ ('A','B','C','D','E','F','G','H','I','J','K' 'L' 'M' 'N' 'O' 'P' 'Q' 'R');
do i = 1 to dim(kon);
sex2 = propcase(put(kon(i),$ATCFMT.));
value = ranuni(0);
output;
end;
run;
proc sort data = test;
by value;
run;
proc sql noprint;
select distinct(quote(strip(sex2))) into: longvalues separated ' '
from test;
quit;
legend1
label = none
position =(bottom center)
across = 1
value = (h=1 &longvalues)
;
proc gplot data = test;
plot height*value=sex2 /
legend = legend1
cframe=cxFFFFFF
;
run;