BookmarkSubscribeRSS Feed
TreeFrog
Calcite | Level 5
Helloooo

Should I expect escapechar in-line formatting to work with labels on AXIS statements, when ODS-ing to html or pdf?

I need a superscript '2' (for metres squared), and also an arrow (Symbol character "AD"x), in my labels.

Doing
ods escapechar="^";
AXIS1
label=(h=14 pt "SALES/m^{super 2} ^S={font_face=Symbol}" 'AD'x);

Then applying this axis in a SAS/GRAPH procedure should work, but alas... not on my watch!

Any ideas?

Thanks...
Tree Frog
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi!
The answer to your first question is NO, you should NOT expect that ODS in-line formatting works in SAS/Graph. Here's why:

SAS/Graph does its thing in a pretty much self-contained bubble -- if the SAS/Graph code is enclosed in an ODS "sandwich" (to HTML or PDF), when SAS/Graph is done, it now has an image that the ODS destination can deal with.

If the image is going to HTML, then ODS builds an HTML tag to point to the location of the image.

If the image is going to RTF or PDF, then the image is converted to those internal formats -- but even if you used the in-line formatting in labels -- at this point, the conversion of the graph is more of a "mechanical" operation -- from one picture format to another picture format -- so there is really no visibility of any in-line formatting at this point because if they are there, they are just part of the picture.

If the image is going to a SAS/Graph catalog or to a color printer on the mainframe or to a pen plotter or to a file there's a good chance that ODS is not involved with SAS/Graph at all. Basically, SAS/Graph does what it needs to do to make the picture and then it sends the picture whereever it needs to go -- all ODS gets from SAS/Graph is a picture in some form or another.

Only the Graph Titles and Footnotes can be "touched" with ODS and your choice there is to keep them within the boundary of the graph area or to move them outside the boundary of the graph and into the control of ODS.

This means that you have to use SAS/Graph techniques to do the super or sub-scripting in your axes labels. The SAS/Graph documentation and Tech Support FAQ are pretty helpful here. Look in the documentation for this example: Example 2. Specifying Logarithmic Axes or in the Tech Support FAQ for this sample: http://support.sas.com/ctx/samples/index.jsp?sid=416&tab=about

If you need more help getting your super/subscripts to work, Tech Support has folks with the graph expertise to help you.
http://support.sas.com/techsup/contact/index.html

Good luck,
cynthia
TreeFrog
Calcite | Level 5
Thanks Cynthia, that's helped my understanding heaps!

However, using the code suggested in the link, I'm not getting the desired results -- in fact, when I cut & paste that code and run it as is (apart from removing the goptions reset=all bit), I'm not getting either of the axis labels showing up at all. And no warnings either.

Might this be something to do with my graph options in EG?

Thanks again!

TF
Cynthia_sas
SAS Super FREQ
Hi!
Hmmmm...there could be someting in EG that is interfering. Or perhaps, since the default driver is ACTIVEX inside EG, it is possible that those AXIS statements are not supported in ActiveX drivers.

To find out for sure, your best bet is to contact Tech Support, as they have both the EG and the SAS/Graph expertise to quickly get to the answer for your question.

cynthia

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
  • 3 replies
  • 893 views
  • 0 likes
  • 2 in conversation