BookmarkSubscribeRSS Feed
rfrancis
Obsidian | Level 7

Hello, I am seeking a simple histogram using Proc Univariate. The code below produces the stats in the output window but no graph anywhere (output window, disk, etc.). I've tried a few version of the ODS LISTING idea, but no luck. Grateful for any ideas. Thank you!  Rick

data binom;
	input var1;
	cards;
	1
	2
	2
	3
	3
	3
	4
	4
	4
	4
	5
	5
	5
	6
	6
	7
	;

ods listing html;
*ods listing gpath="c:\temp";

proc univariate data=binom;
	histogram var1 / normal;
var var1;


run;
4 REPLIES 4
PaigeMiller
Diamond | Level 26

Do you get an error in the log?

 

HTML (and histograms) cannot be written to the LISTING destination.

 

You want to use 

 

ods html;

with possibly other options in the ods html statement.

--
Paige Miller
rfrancis
Obsidian | Level 7

Thank you! ODS HTML does the trick. 

ChrisHemedinger
Community Manager

Don't forget to enable ODS graphics before your PROC UNIVARIATE.

 

ods graphics on;
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
rfrancis
Obsidian | Level 7

Thank you!  ODS GRAPHICS ON is helpful!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 4 replies
  • 2308 views
  • 6 likes
  • 3 in conversation