09-20-2015 07:30 AM
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 !
09-20-2015 09:02 AM
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;
09-21-2015 12:13 AM - edited 09-21-2015 12:45 AM
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.
09-21-2015 11:34 AM
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;