BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fastb
Fluorite | Level 6

I am making comparative histogram plots in proc univariate with a normal curve.  When the plots are produced, they have a legend for the normal curve that says Curve --------- Normal (example image provided).  I do not want this legend to appear, but for some reason I cannot find the code that I need to suppress this.


Univariate Histogram.JPG
1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

You have to edit the Histogram template for the Univariate procedure.

Set

ods trace on;

odsselect Histogram;

Now, run the Univariate step.  You will see the names of the template used for histogram along with the path to the template.   It will be something like "base.univariate.Graphics.Histogram" depending on the SAS release.  Open this template using the ODStemplate command.  Copy the template to a program editor.

Make sure SASHELP.TMPLMST is Read only and not first in the ODS Path.

In the editor, find the instances where the code "DiscreteLegend" is used.  Comment out this code, and then submit the template program. The template will now be compiled and saved to your SASUSER.TEMPLAT itemstore.

Rerun your Univariate step, and the legend should be gone.  The procedure will use the template from your sasuser first.  When you want to go back to the original, remove this template from sasuser.templat.

View solution in original post

2 REPLIES 2
Jay54
Meteorite | Level 14

You have to edit the Histogram template for the Univariate procedure.

Set

ods trace on;

odsselect Histogram;

Now, run the Univariate step.  You will see the names of the template used for histogram along with the path to the template.   It will be something like "base.univariate.Graphics.Histogram" depending on the SAS release.  Open this template using the ODStemplate command.  Copy the template to a program editor.

Make sure SASHELP.TMPLMST is Read only and not first in the ODS Path.

In the editor, find the instances where the code "DiscreteLegend" is used.  Comment out this code, and then submit the template program. The template will now be compiled and saved to your SASUSER.TEMPLAT itemstore.

Rerun your Univariate step, and the legend should be gone.  The procedure will use the template from your sasuser first.  When you want to go back to the original, remove this template from sasuser.templat.

fastb
Fluorite | Level 6

The legend has now been successfully removed by customizing the template.  Thank you for your help with this Sanjay!!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2629 views
  • 0 likes
  • 2 in conversation