BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

Hello everyone,

 

How to draw the curve line in stead of dots in this graph? also how to make the axis scales looks better?

 

Thanks!

data have;
input age $1-6 value;
cards;
0-1	1.823963682
1-5	3.027834607
5-10	9.444323403
10-15	15.86313325
15-20	22.2666938
20-25	28.48689472
25-30	34.61049863
30-35	40.8857274
35-40	47.14276882
40-45	53.33288701
45-50	59.39282965
50-55	65.24955141
55-60	70.77393144
60-65	75.92202747
65-70	80.66435999
70-75	84.99938899
75-80	89.14446952
80-85	92.91545641
85-90	96.06852158
90-95	98.44391012
95-100	99.70534076
100+	100.75
;
run;

proc gplot data=have;
   plot value*age ;
run;
quit;
3 REPLIES 3
Reeza
Super User

Can you use SGPLOT instead? It produces better quality graphs. 

 

If so, use a SERIES statement to get a line graph. If you want a best fit curve see the REG and/or SPLINE statements in SGPLOT. 

 

To control the axis using SGPLOT see the XAXIS and YAXIS statements. 

GeorgeSAS
Lapis Lazuli | Level 10

Thank you!

Can we export the graph of gplot to excel file? If yes, how?

 

Thanks!

SASKiwi
PROC Star

Here is how you find the documentation that will answer your questions. In the website sas.support.com type in the search words gplot procedure 9.4 and press the search button. You will then find this link:

 

http://support.sas.com/documentation/cdl/en/graphref/69717/HTML/default/viewer.htm#n1e0onjgevom4kn1h...

 

 Included in the link are examples and syntax that will answer your questions.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 656 views
  • 2 likes
  • 3 in conversation