Hello,
At the end of my SAS programm, I have an ODS section where I send tables to an rtf file (all together). I use PROC TABULATE and PROC REPORT. If I need a part of an output (from a model for example), I save it as a dataset and then use TABULATE or REPORT to send it to the same rtf with the rest of the output. If I want a plot, easy, inside the ODS section I use SGPLOT or another procedure.
Now I want a MOSAIC plot. I couldn't find an easy way of plotting one besides using PROC FREQ. The question is, how do I output the plot and only the plot, to an rtf file ? In other words, can I tell SAS not to print anything from the PROC FREQ apart from the MOSAIC plot ?
Thank you !
ods graphics on;
ods select MosaicPlot;
proc freq data=sashelp.class ;
table sex*age/plot(only)=mosaic;
run;
ods graphics on;
ods select MosaicPlot;
proc freq data=sashelp.class ;
table sex*age/plot(only)=mosaic;
run;
Well, I am not expert of ODS Graphic. But you could try this :
ods select MosaicPlot;
title1 'ssssssss';
title2 'xxxxxxxxx';
ods text=' ' ;
proc freq data=sashelp.class ;
table sex*age/plot(only)=mosaic;
run;
Thank you ! I tried it and it didn't delete the title from the plot. When I say title, I don't mean the title of the output, I mean the actual title of the plot, inside the white square of the plot. I am not sure it's even possible.
Check the NOGTITLE option on the ODS RTF statement.
Use the %MODTMPLT macro, which is described in the SAS/STAT documentation:
title; /* clear the title */
%modtmplt(options=replace, template=Base.Freq.Graphics.MosaicPlot, steps=t)
proc freq data=sashelp.class;
tables sex*age / plots(only)=MosaicPlot;
run;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.