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

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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