BookmarkSubscribeRSS Feed
newtriks
Obsidian | Level 7

Here's the code -

PROC SGPLOT data=STAN.cardata;
scatter x=year y=age_adjusted_rate;
series x=year y=age_adjusted_rate;
RUN;

 

What I get is a straight line from lower left to upper right, with the y-axis values aligning with the year of the observation, rather than the value of the 'age adjusted rate'. 

 

From the graph, here's a sample of the values of  'age adjusted rate' values on the y-axis from top to bottom:

2.81

2.52

2.48

2.65

3.09

3.43

.(10 additional values, also in improper order)

6.73

6.59

6.55

 

What am I missing?

 

Thanks-

2 REPLIES 2
PaigeMiller
Diamond | Level 26

It seems to me the most likely explanation is that age_adjusted_rate is a character variable. Is it?

 

Can you show us the plot? (Use the "Insert Photos" icon to include your screen capture in your reply)

--
Paige Miller
newtriks
Obsidian | Level 7

Yes, that's the answer. Thank you!

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 2 replies
  • 901 views
  • 0 likes
  • 2 in conversation