BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello everybody,
when i run this following code,

proc sort data=sashelp.class out=class;
by sex;
run;

ods rtf file="....myfile.rtf" style=journal;

ods graphics on;
ods select QQPlot;

Proc Univariate Data=class;
by sex;
QQPlot height / Normal(mu=est sigma=est) ;
Run;

ods graphics off;
ods rtf close;

I have at each time, before my graphics, this :
The UNIVARIATE Procedure
Variable: Height
Sex=F

(the variable name and the modality of group variable)

what the way to control this in my output ?
I don't find it in the style template, and i seek it during long hours....
I want to use directly the output and the output with "the univariate procedure..." before the graphs is not really usefull, and it will be very nice to remove this text.
Thank you and have a nice day.
6 REPLIES 6
deleted_user
Not applicable
in fact, to remove : "the univariate procedure" before my graph is simple,
i have just to add an ods noproctitle in my code and it will be OK.
but where can i retrieve the information :Variable: Height Sex=F
if i want to put the information Sex=F in the file png ?
what the way to remove this information :":Variable: Height Sex=F" if i don't want it in my output before my graph ?
thank you very much for yours answers ;-))
Andre
Obsidian | Level 7
Under version 9.1.3 you can do this

[pre]
proc sort data=sashelp.class out=class;by sex;run;
options nodate ;
title ;
ods listing close;
ods rtf file="d:\temp\qqplot.rtf" style=journal;
goptions device=sasemf vsize=9 cm hsize=7 cm;
ods graphics on;
ods exclude Moments BasicMeasures TestsForLocation Quantiles ExtremeObs;
*ods trace on;
ods rtf startpage=no;
Proc Univariate Data=class;
by sex;
QQPlot height / Normal(mu=est sigma=est) ;
Run;
*ods trace off;
ods graphics off;
quit;
ods select all;
ods rtf close;
ods listing;
[/pre]

png? qqplot part on ods trace where not finded at all

HTH
Andre
Cynthia_sas
SAS Super FREQ
Hi:
Keep in mind that in SAS 9.2, the ODS Graphics framework does NOT use GOPTIONS, as it says in the documentation:
http://support.sas.com/documentation/cdl/en/statug/59654/HTML/default/statug_odsgraph_sect019.htm

Note that traditional graphs are saved in SAS graphics catalogs and are controlled by the GOPTIONS statement. In contrast, ODS Graphics produces graphs in standard image file formats (not graphics catalogs), and their appearance and layout are controlled by ODS styles and templates.


To change the image format of the output for ODS GRAPHICS, investigate the IMAGEFMT= option (however, I do not believe that the device driver is causing the issue that was originally reported.) When you use ODS Graphics, the title on the graph: Q-Q Plot for XXXXXX is placed there by an ENTRYTITLE statement in the Graph Template. I thought the original requirement was to get the BY group information into the body of the graph.

In SAS 9.2, there isn't a way to insert byline information into the Graph template; so the Byline information appears in the ODS destination file along with the other information. However, you could have a Univariate step for each BY group and create a macro variable to hold the BY group value. Then a change to ENTRYTITLE (and a couple of other places on the Graph template) could get extra information into the Q-Q plot graphic output.

This may be a question for Tech Support, as it makes a difference whether they are using SAS 9.2 or SAS 9.1.3 to produce this output. ODS Graphics was experimental in SAS 9.1.3 and it's possible that techniques that produce one result in SAS 9.1.3 will not produce the same result in SAS 9.2, when ODS Graphics capability became production.

cynthia
Andre
Obsidian | Level 7
Cynthia,
I have only the 9.1.3 sas version,
and the original program submitted was stopping upon the lack of QQplot ods element in the ods rtf (sandwich)!
Monpe was also speaking about a png file.

In 9.2 does the interaction between an eventually forgotten goptions and ods graphics
disappear?
If i retry under 9.1.3 my program without goptions and with only
ods rtf and ods graphics on
there is a gseg catalog created !

The functioning under 9.2 will be completely different?
Thanks for some insight as 9.2 is not yet distributed in France for me.

Andre
Cynthia_sas
SAS Super FREQ
Andre:
It would be like comparing apples and oranges. Apples are red or green outside. Oranges are mostly orange outside. They both have seeds (unless you have seedless oranges). Yes, they are both members of the fruit family, but they are COMPLETELY different.

So too, are ODS GRAPHICS in SAS 9.1.3 and ODS GRAPHICS in SAS 9.2 very different. It was my understanding that "turning on" Proc Univariate for ODS GRAPHICS was a 9.2 enhancement -- so it's possible that the QQPLOT graph object is NOT created at all in SAS 9.1.3. What you may be seeing are the results of asking for QQPLOT using Univariate -- that capability predated ODS GRAPHICS ON/OFF.

In addition, back to the apples vs oranges comparison -- you really cannot compare how graphs were/are created in SAS 9.1.3 and how graphs are created in SAS 9.2, especially with the ODS GRAPHICS Framework -- which includes (but is not limited to) the ODS GRAPHICS ON/OFF statements because the underlying infrastructure of SAS/Graph and ODS Graphics was entirely changed to use STYLE Templates for ALL graphics output and drivers. This was not true for SAS 9.1.3, only the ActiveX-based and Java-based drivers use style templates in SAS 9.1.3.

The documentation for SAS 9.2 and ODS Graphics is on-line and is too voluminous to quote here. These are some comparisons:
http://support.sas.com/documentation/cdl/en/grstatproc/60786/HTML/default/a003200193.htm
http://support.sas.com/documentation/cdl/en/graphref/59607/HTML/default/a003275276.htm

But, it is true that GOPTIONS do not have an impact on anything you create with ODS GRAPHICS ON/OFF or anything you create with the new "SG" procedures (SGPLOT, SGSCATTER, SGPANEL). GOPTIONS -can- impact SAS/Graph output and in some instances, a GOPTIONS setting could "clobber" a setting inside the style template.

If you have legacy SAS/Graph code that you want to run in SAS 9.2 and if the code has been heavily customized with COLOR, and FONT settings using SAS/Graph methods, then you will want to investigate the GSTYLE system option in order to make sure that your legacy programs continue to run, as originally programmed. Another change between SAS 9.1.3 and SAS 9.2 involves the fact that for ODS GRAPHICS, PNG files are usually created (instead of GRSEG catalog entries). For some destinations, like LISTING (in SAS 9.2) when you click on a graph, your default system picture viewer is used to display the graph output. On the other hand, if you continue to use SAS/Graph methods, then a GRSEG entry could be created that would use the SAS Style template information for colors and fonts, if the GSTYLE option is turned on.

There have been quite a few SAS Global Forum papers announcing the new infrastructure. Here are a few:

SG Procedures:
http://www.lexjansen.com/wuss/2008/how/how05.pdf
http://www.lexjansen.com/pharmasug/2008/tu/tu04.pdf
http://www.lexjansen.com/phuse/2008/tu/tu06.pdf
http://www.lexjansen.com/wuss/2008/pos/pos01.pdf
http://www2.sas.com/proceedings/forum2008/255-2008.pdf
http://www2.sas.com/proceedings/forum2007/088-2007.pdf
http://www.lexjansen.com/wuss/2007/DataPresentationsBusIntell/DPBI_Heath_SASGraphProcedures.pdf
http://www.lexjansen.com/wuss/2006/Analytics/ANL-Tobias.pdf
http://www.nesug.org/proceedings/nesug08/ff/ff15.pdf
http://www2.sas.com/proceedings/forum2008/077-2008.pdf
http://www2.sas.com/proceedings/forum2008/321-2008.pdf


Style Templates and Graph Templates:
http://www2.sas.com/proceedings/forum2008/077-2008.pdf
http://www2.sas.com/proceedings/sugi31/262-31.pdf
http://www.lexjansen.com/phuse/2008/cs/cs10.pdf
http://www.nesug.org/Proceedings/nesug05/dp/dp7.pdf
http://www.lexjansen.com/pharmasug/2007/ad/ad14.pdf
http://www2.sas.com/proceedings/forum2007/193-2007.pdf
http://analytics.ncsu.edu/sesug/2007/PO22.pdf
http://www2.sas.com/proceedings/sugi29/204-29.pdf
http://www2.sas.com/proceedings/sugi31/095-31.pdf
http://www2.sas.com/proceedings/forum2007/088-2007.pdf
http://www.lexjansen.com/pharmasug/2008/tu/tu04.pdf
http://www2.sas.com/proceedings/forum2007/092-2007.pdf
http://www.lexjansen.com/phuse/2008/tu/tu06.pdf
http://www2.sas.com/proceedings/forum2008/321-2008.pdf

Then, these papers were written specifically to highlight the way that Graph and Style templates worked experimentally with ODS Graphics ON/OFF in SAS 9.1.3 and with DATA Step in SAS 9.1.3. However, the methods highlighted in these papers have been replaced by the SGRENDER procedure in SAS 9.2 - -so if you want an introduction to how ODS Graphics worked in SAS 9.1.3 -ONLY-, then these are some resources:

SAS 9.1.3 Graph Templates and Data step (this method replaced by SGRENDER procedure in 9.2):

http://www2.sas.com/proceedings/sugi30/239-30.pdf
(download programs for above paper in 9.1.3 SAS: http://support.sas.com/rnd/papers/sugi30/ods_graph.zip )
http://www.lexjansen.com/phuse/2006/cc/cc02.pdf

cynthia
Andre
Obsidian | Level 7
Thanks for this list of references
i had notice some of them but has never begin to read them as
in 9.1.3 this was experimental and subjected to changes

Indeed in 9.1.3, i make confusion due to the lack of practical separation.


Now i hope that Sas France will forward the 9.2 version to academic people
as soon as possible

Andre

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1792 views
  • 0 likes
  • 3 in conversation