SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
TheJax
Calcite | Level 5

Hello,

I am working with Scatterplots and have been asked to provide some additional information to a colleague.

 

She wants to know if there is a way to create a table of the point counts in the grid cells.  For example:

 

Capture.JPG

 

I've only recently started using SAS and have no idea how to get this done.  Appreciate any feedback! Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Are your X and Y variables used in the scatterplot actually continuous or perhaps integer? If the values are integer then likely very easy but if you they are not then you need to provide something that would let use know the boundaries of the values for each cell.

 

If the values are integer then perhaps:

proc tabulate data=yourdataset;
   class xvar;
   class yvar /order=descending;
   tables yvar,
             xvar*n=' '
            /misstext='0'
  ;
run;

But likely you need to do something to provide us the cell boundaries and something like above but with Custom formats would create the cell boundaries.

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Forget SAS for a minute. Before anyone can do SAS, we need to understand the problem.

 

Describe what a scatterplot of such data would look like — draw it on paper and scan it in; or find such a scatterplot on the Internet and give us the link,

AND explain how you create a scatterplot from such data DO NOT SKIP THIS PART.

--
Paige Miller
ballardw
Super User

Are your X and Y variables used in the scatterplot actually continuous or perhaps integer? If the values are integer then likely very easy but if you they are not then you need to provide something that would let use know the boundaries of the values for each cell.

 

If the values are integer then perhaps:

proc tabulate data=yourdataset;
   class xvar;
   class yvar /order=descending;
   tables yvar,
             xvar*n=' '
            /misstext='0'
  ;
run;

But likely you need to do something to provide us the cell boundaries and something like above but with Custom formats would create the cell boundaries.

TheJax
Calcite | Level 5
Thank you!

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1120 views
  • 1 like
  • 3 in conversation