BookmarkSubscribeRSS Feed
Shirin
Obsidian | Level 7

Hello,

I am trying to make a simple histogram with counts on the vertical axis but I am getting very weird looking graphs...

I do have 76000 ID's in my data with each having a count:

ID          count

1               89

2              126   

3               569

.               .

.               .

.               .

.               .

.               .

.               .

76000     176

I want each of the IDs to have a column and the column to be as tall as the count.

Thanks Smiley Happy

4 REPLIES 4
Reeza
Super User

What code/proc are you using now that is giving you weird answers?

Shirin
Obsidian | Level 7

I'm using a proc univariate

ballardw
Super User

Trying to create 76000 columns in a single chart is probably not ever going to work, especially with univariate.

Try either proc gplot or sgplot,maybe with a needle plot. Though you aren't going to have much luck associating any specific ID with it's count.

Reeza
Super User

Usually you can use weight for a variable when you have the counts already pre-processed, however the histogram statement does not support this in proc univariate.

I'll agree with BallardW suggestion of a Needle Plot.

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