I am using layout gridded to merge the legends to get the following inside the graph
Iam using the following code
|Layout Gridded / halign=left valign=bottom border=yes;|
entry halign=left "drug";
|mergedlegend '1' 'a' /border=no;|
|mergedlegend '2' 'b' /border=no;|
|mergedlegend '3' 'c' /border=no;|
How can I align properly, you see blue line is center as it is shorter and red line is longer! I need to align this properly as it looks awkward now!!
What are the Formats associated with the variables that are producing XX, YYYYY and ZZZ? I would try making sure that the lengths of those variables's formats are all the same (longest).
The picture displayed doesn't really look like the blue is shorter just that the whole contents of line and label are centered and the text is shorter so the left and right displayed area are more towards the center.
Have you tried haling = left on each of merged items?
There are no format associated I just give it in the legendlabel statement Please see below
scatterplot x=chg1 y=pct1 / markerattrs=graphdata1(size=8.5 symbol=trianglefilled) name='a' legendlabel="XX";
stepplot x=chg1 y=pct1 / lineattrs=graphdata1(pattern=solid thickness=1) name='1' legendlabel="XX"*/;
scatterplot x=chg2 y=pct2 / markerattrs=graphdata2(size=8.5 symbol=circlefilled) name='b' legendlabel="YYYYY";
stepplot x=chg2 y=pct2 / lineattrs=graphdata2(pattern=shortdash thickness=1) name='2' legendlabel="YYYYY";
scatterplot x=chg3 y=pct3 / markerattrs=graphdata3(size=8.5 symbol=SquareFilled) name='c' legendlabel="ZZZ";
stepplot x=chg3 y=pct3 / lineattrs=graphdata3(pattern=mediumdash thickness=1) name='3' legendlabel="ZZZ";
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.