BookmarkSubscribeRSS Feed
data_null__
Jade | Level 19

I using SAS 9.3 (TS1M2).  I have a 1x2(RxC) cell data panel and I want to specify the CELLWIDTH.  I want this so I can "compare" separate graphs.  My Y axis tick labels are long and different lenght on different graphs so the size of the data cells will vary depending of the tick lables.

I don't have to stick with DATAPANEL but I would like to have control over the size of the cells that have a common Y axis.

Or maybe there is a way to specify the area for the tick labels. I'll check on that.

4 REPLIES 4
Jay54
Meteorite | Level 14

I am unable to visualize what you want.  Can you attach a graph you have now, or one you want?

There is no way in SG or GTL to specify a cell sizes for a Data Panel.  The width of the graph is allocated equally to all columns after accounting for the common Y axis space.  With SAS 9.4, you can get PROPORTIONAL allocation based on the number of category values in each cell.

You could use LAYOUT LATTICE, with independent Y axes.  In this case, you can specify cell widths as a proportion, you can also make the Y axis common.

data_null__
Jade | Level 19

I can't post my output.  I have two separate calls to SGRENDER a 1x2 DATAPANEL.  The Y tick labels are long and different length on each graph.  The tick labels are causing the size of the datapanel cells on the graph with long labels to be be smaller than on the other graph.  I want to make the cell size on the two graphs uniform.

I have been able to use a fixed font and pad the Y tick label values with 'a0'x and achieve a somewhat acceptable result.  Then I came up with the DRAWTEXT idea but that did not produce acceptable results.  But I think it will work if I switch to LAYOUT LATTICE, I'll work on it.  Maybe this could be the subject of your next blog. Smiley Happy

Jay54
Meteorite | Level 14

Two separate SGRENDER calls means the 1x2 layout is outside the graph, maybe using ODS Layout?   So it seems each graph is still a single cell and not a DATAPANEL.  DRAWTEXT should work in this case.  You can guarantee the cell widths will be same by using same graph widths and turning off the Y axis for both graphs.   Pad the graphs on the left to provide space for your custom axis values using pad=(left=10%).  Now you can either annotate or DRAWTEXT the yaxis tick values into the padded space.  If I understand this correctly, I think you can use either SGRENDER ore SGPLOT.

data_null__
Jade | Level 19

I did not explain my requirements well, I apologize for that. Suffice it to say that using LAYOUT LATTICE I was able to achieve everything I needed to generate a uniform multi-page figure.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1098 views
  • 0 likes
  • 2 in conversation