Data visualization with SAS programming

How to align contents of column to the right

Reply
Contributor
Posts: 27

How to align contents of column to the right

Is there a way to align one of the columns to the right?

CODE:

layout overlay / HALIGN=RIGHT xaxisopts=(display=none)

yaxisopts=(reverse=true display=none) walldisplay=none;

referenceline y=ref / lineattrs=(thickness=15 color=_color);

scatterplot y=subgroups x=zero / markercharacter=drug1

markercharacterattrs=graphvaluetext;

endlayout;

I tried added HALIGN=RIGHT, and it still looks like this:

Thank you for all the help!

Valued Guide
Posts: 854

Re: How to align contents of column to the right

I'm not sure if this will work but try just=right or just=r.

Contributor
Posts: 27

Re: How to align contents of column to the right

Just tried.  Still centered.

Valued Guide
Posts: 854

Re: How to align contents of column to the right

I'm at a loss, take a look and see if this helps:

SAS/GRAPH(R) 9.2: Statistical Graphics Procedures Guide, Second Edition

SAS Super FREQ
Posts: 1,044

Re: How to align contents of column to the right

With SAS 9.3 you can use DataLabelPosition on the MarkerChar to align your data.

With SAS 9.4, you can use the Axis Table with many options.

Note, the HALIGN=RIGHT is for alignment of this layout itself inside the parent layout, and not for alignment of the text in a column.

Contributor
Posts: 27

Re: How to align contents of column to the right

Sorry to ask, but do you have an example?

SAS Super FREQ
Posts: 1,044

Re: How to align contents of column to the right

What SAS release are you using?  I an not sure what I can suggest with SAS 9.2.

Some Forest Plot examples are here:  http://blogs.sas.com/content/graphicallyspeaking/?s=forest+plot

Contributor
Posts: 27

Re: How to align contents of column to the right

I'm currently using 9.3. TY

SAS Super FREQ
Posts: 1,044

Re: How to align contents of column to the right

The link above shows you a full example of a Forest Plot using SAS 9.3.  Go to bottom of article and click on link to see full program.

You can use a ScatterPlot with DataLabel to show the values.  Set DataLabelPosition to left or right and set marker size =0. 

You can also use HighLow plot with HighLabel or LowLabel to display the values. Program above uses HighLow plot.

Post a Question
Discussion Stats
  • 8 replies
  • 527 views
  • 0 likes
  • 3 in conversation