So I decided to annotate my Y axis tick labels. This drawtext statement works to place the text at the correct Y value and X=-10 is pretty close to where I want it on the left.
drawtext 'this is it' / x=-10 xaxis=x2 y='10-001' xspace=layoutpercent yspace=datavalue;
There's just one small problem the text is drawn in all columns (in my case 2) and I can't figure out how to only get it drawn in one column.
If I move the statement to outside the LAYOUT PROTOTYPE; block I cannot use YSPACE=DATAVALUE and I don't see how I can find the correct place to draw the text.
What if you moved the draw text outside of the prototype and used "layoutpercent" for the Y as well?
But how can I associated the text with the Y tick values when I change to percent. I am trying to label the common Y similar to way the X is is annotated here. 44129 - Split axis values across multiple lines with the Graph Template Language (GTL)
I want multiple calls to produce uniform panels, this question. https://communities.sas.com/message/193891#193891
I've got part of that working using a fixed font for Y axis tick labels of all 'a0'x and then annotate the values I wan't using DRAWTEXT with proportional font.
Maybe I'm doing it all wrong and need to start over.
Any statements in the PROTOTYPE of a LAYOUT DATAPANEL are always drawn in all the cells. So, any DRAW statements will also draw in both cells. This would be fine for the two X axes if they are UNION, and in both cases, a negative Y dimension will take you below each axis line. For Y axis, the negative X dimension will take you to the left of both cells, which is ok for left cell, but not the right cell. Example 44129 is for a single cell graph.
But, DATAPANEL creates equal size cells anyway, so I don't understand the issue. Can you attach your graph output?
You could use a 1x2 LAYOUT LATTICE, and populate each cell yourself with the right plot statements with the subset of the data. In GTL, you can use the IFN or IFC syntax to subset the data by a class variable. Keeping Y axis for both cells, you can then use the DRAW statements in each LAYOUT OVERLAY to draw the split axis tick values. You will have to do something to reserve the right amount of white space for DRAWing the custom tick values.
SAS 9.4 will do split tick values for you with just an option. This was going to be the topic of my next blog. 🙂
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.