BookmarkSubscribeRSS Feed
metro
Fluorite | Level 6

Hi all,

I am using Proc Boxplot and and ods to create an rtf file.  Within the framed boxplot there is a header "Distribution of X by Y" that I would like to remove, but I cannot find the correct option/setting.  (The title I have created displays fine, above the framed box).

5 REPLIES 5
Cynthia_sas
SAS Super FREQ

Hi:

  This is one of those questions where seeing your actual code would be useful. Are you using ODS GRAPHICS to create your output (in which case, you might see "Distribution of  X by Y" inside the graph area), or are you using PROC BOXPLOT without any ODS GRAPHICS statements?

  My guess is that you have ODS GRAPHICS turned on. One alternative would be to turn
ODS GRAPHICS OFF; 
before your ODS RTFand PROC BOXPLOT program statement. When you use PROC BOXPLOT to create device based graphics, I do not believe that "Distribution of  X by Y" is put into the output graph.

  If you used the TURBINE data from this sample note:

http://support.sas.com/kb/25/651.html then another alternative would be for you to use PROC SGPLOT to replicate the graph that you get from PROC BOXPLOT:

cynthia

options nodate nonumber center;

ods rtf file='c:\temp\sgplot_box.rtf';

  title 'The Title';

  proc sgplot data=Turbine;

    vbox kwatts / category=day extreme;

    yaxis values=(2750 to 4250 by 250);

  run;

ods rtf close;

metro
Fluorite | Level 6

Yes, you are correct, I am using the ODS GRAPHICS which makes great boxplots and I don't have to edit the labels and they look great. When I output to rtf without ODS GRAPHICS  the graph is too small and the labels wrap and it is pretty ugly (although as you noted it does not have the "Distribution of X by Y"). I guess there is not an easy way around this using Proc Boxplot....

Cynthia_sas
SAS Super FREQ

Hi:

  It depends on what you consider "easy". There is a way to use ODS GRAPHICS and get rid of that Distribution info -- but it would involve changing the graph template that was used for PROC BOXPLOT and removing the ENTRYTITLE statement that contains that text string. If you are not into modifying the graph template, then the easiest thing to do is to live with the Distribution information; the next easiest thing to do is to use PROC SGPLOT and the VBOX statement to create an RTF file with ONLY your TITLE.

cynthia

metro
Fluorite | Level 6

Thanks so much for your help.  This is the first time I have used the discussion group.  Could you tell me--is there a document somewhere that gives information about how to use the discussion group, e.g. I was unable to copy my code into the reply-I had to attach a file.  Also, do I now click the correct answer tab to show that this question has been solved?

Thanks,

Karen

bvancil
Calcite | Level 5

I had this problem and noticed that if I use ODS graphics mode, then I can remove the title that says "Distribution of..." with an odstitle = none option to the plot statement.

SAS Innovate 2025: Register Now

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 8346 views
  • 3 likes
  • 3 in conversation