Help using Base SAS procedures

Proc Boxplot remove "Distribution" header

Reply
New Contributor
Posts: 4

Proc Boxplot remove "Distribution" header

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).

SAS Super FREQ
Posts: 8,743

Re: Proc Boxplot remove "Distribution" header

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;

New Contributor
Posts: 4

Re: Proc Boxplot remove "Distribution" header

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....

Attachment
SAS Super FREQ
Posts: 8,743

Proc Boxplot remove "Distribution" header

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

New Contributor
Posts: 4

Proc Boxplot remove "Distribution" header

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

Ask a Question
Discussion stats
  • 4 replies
  • 3597 views
  • 2 likes
  • 2 in conversation