BookmarkSubscribeRSS Feed
Meteorite | Level 14
Welcome to the SAS/GRAPH and ODS Graphics forum!

The purpose of this forum is to discuss the visual representation of data using SAS/GRAPH and ODS Graphics. This is the place to share your questions, suggestions, experiences and pains regarding graphics. ODS Graphics is available with SAS 9.2.

It is important to understand what areas of graph creation should be discussed in this forum. Clearly, any discussion regarding the use of the SAS/GRAPH product, such as graph procedures and statements, annotation, Graph Template Language (GTL), etc. belong in this forum.

ODS Graphics and GTL are extensively used for creation of graphs by Base, SAS/STAT, SAS/ETS, SAS/HPF and other SAS products. Any discussion on the CONTENT of such graphs, including the statistics behind them, should be discussed in the relevant forums for these products.

With that said, here are the areas that should be discussed here:

1. SAS/GRAPH procedures, statements and options – These include four new Statistical Graphics (SG) procedures: SGPLOT, SGPANEL, SGSCATTER, SGRENDER.

2. The Graph Template Language (GTL) – Any discussions about the use of GTL, including graph template creation, syntax questions, tips and tricks, etc.

3. The ODS GRAPHICS statement – This statement is much like the “goptions” of the ODS Graphics system. It contains options that can affect the output of any graphics produced through the system, including those from other SAS products.

4. ODS styles as applied to graphs – This item includes output from both SAS/GRAPH and the ODS Graphics system.

5. ODS Graphics Editor – This interactive application is designed to post-process your ODS Graphics output. Because the graphs are “live” in this application, you can do things like move legends, change plot attributes, add annotation, and change styles.

6. ODS Graphics Designer – This application is designed to create graphs interactively, without the need to write code. The application can be used to create “one-time” graphs, or it can be used to design graphs that can be run in batch.

We hope you find the discussions in this forum useful as you endeavor to make the most of SAS graphics.

Please note that this forum is not an official customer support channel for SAS. If you require direct assistance please contact SAS Technical Support.

Thank you!
Graph Forum Administrators
Obsidian | Level 7
I probably am not describing this in a technically correct manner or with the correct nomenclature, but let me try to describe the situation and the need as I see it.

With 9.2 the new graph styles are applied to what I will call the "native" ODS styles. By a native ODS style I mean, e.g., Styles.Default or Styles.Minimal.

The use of graph style elements produces unexpected results, and, furthermore, the results can vary depending on the native ODS style selected. I.e., if the user prepares the graph for a destination with Styles.Minimal or with Styles.Default, the result will vary depending on which native style was chosen. And each of the two different results will differ from what the user would have gotten in 9.1.3.

I know from direct experience that what GSTYLE does to Styles.Minimal versus Styles.Default is different.

I understand, from the online documentation "What's New in SAS/GRAPH 9.2", that I can revert to 9.1.3 by specifying the NOGSTYLE system option, by specifying the FONTRENDERING=HOST_PIXELS system option, and by specifying DEVICE=ZGIF on the GOPTIONS statement when I am sending output to the HTML destination.

In principle, a user can discover the effects of the default application of graph styles that occurs automatically in 9.2 by experimentation. I.e., the user can run her/his code without and with the reversion overrides, and then compare the results.

However, is there any published resource that documents exactly and completely what are the new default effects on graphs for each of what I call the native ODS styles? Furthermore, do the effects vary by SAS/GRAPH procedure?

Thank you.
Hello Dr. Bessler,

There is a document in the SAS Help that should provide some guidance. If you look under SAS Products->SAS Graph->Graph Appearance->Styles->Modifying a Style, you will see a document called "Style Elements for use with Device-Based Graphics". In this document, you will the style element names and attributes, along with the parts of the graph they affect. Take a look at that document and see if it helps.

Calcite | Level 5 EdK
Calcite | Level 5
Re item 5 Graphics editor: What can't be changed or rather moved are series labels. In my SGPLOTS with multuple series there is usually no label postion which does not collide with some of the series. If I could tweak the postions of the colliding labels I'd have a much happier customer. (Note that I need to automate at least the first pass at making these graphs since there I have so many of them to do.)
Meteorite | Level 14
Thanks for this suggestion. To ensure we can track this as a user requested feature, please call it into Tech Support.
Calcite | Level 5 EdK
Calcite | Level 5
In Feb 2009 I submitted report 7610178288 (now closed) about this problem. I was just checking to see if anything was happening. Do you suggest that I resubmit? Thanks.
Meteorite | Level 14
The original report should be enough. Thanks.
Not applicable
Hello et al.,

I want to adjust XAXIS offset in PROC SGSCATTER how to do this?

Example, in AXIS statement we have option OFFSET=(x,y)unit. Here we can adjust, the same way how can i do this in PROC SGSCATTER.
This is my sample code

ods listing close;
goptions reset=goptions device=png target=png;
ods rtf file='Scatterplot.rtf';
ods graphics / reset width=600px height=400px imagename='ScatterPlot' imagefmt=gif;
title "Height vs Weight Statistics";
proc sgscatter data=sashelp.class;
plot weight * height /

ods rtf close;
ods listing;

appreciate your suggestions.

warm regards,
Hi: rather than piggyback on an earlier posting, you may want to start a completely new thread for your question.
Hey Suniel,

To answer your question, for single-cell scatter plots, you should use SGPLOT instead of SGSCATTER. SGSCATTER was designed primarily for PANELLED scatter plots. You can set the axis offset in SGPLOT.




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. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 9 replies
  • 6 in conversation