BookmarkSubscribeRSS Feed
anig0904
Calcite | Level 5

I have to plot on a single plot for 7 patients

the units are pressure on the x axis and crosssectional area (CSA) on the y axis

for each pt we have a set of upto 10 values of pressure and CSA depending on the volume  that has a starting point of 25 cc and increase by 5 cc

 

Patient 1

vol     CSA       Pressure

25     163       7.2

30     161      11.8

35     172      19.5

40     158     32.2

45     165      46.8

50      179      68.1

 

How can I plot using SAS

 

 

50

5 REPLIES 5
Reeza
Super User

SGPLOT is a good place to start.

This is more complicated that your requirements - you don't need the group variable but otherwise it should get you started. 

Add XAXIS and YAXIS statements to control your axis values.

 

http://documentation.sas.com/?docsetId=grstatproc&docsetVersion=9.4&docsetTarget=n06fb9ichgg6akn1806...

 

Note that you should be able to run the example code in the links and they should work out of the box.

 


@anig0904 wrote:

I have to plot on a single plot for 7 patients

the units are pressure on the x axis and crosssectional area (CSA) on the y axis

for each pt we have a set of upto 10 values of pressure and CSA depending on the volume  that has a starting point of 25 cc and increase by 5 cc

 

Patient 1

vol     CSA       Pressure

25     163       7.2

30     161      11.8

35     172      19.5

40     158     32.2

45     165      46.8

50      179      68.1

 

How can I plot using SAS

 

 

50


 

 

anig0904
Calcite | Level 5

i am unable to figure the right type and also how to put the data for easy readability.

 

Reeza
Super User

@anig0904 wrote:

i am unable to figure the right type and also how to put the data for easy readability.

 


I don't know that means. What 'type' and what 'readability' are you referring to here?

 

What do you have so far? What have you tried? Where exactly are you stuck?

 

Steps:

 

1. Import data

2. SGPLOT - based on example using a SCATTER or SERIES statement. 

 

 

 

anig0904
Calcite | Level 5

I have to plot on a single plot for 7 patients

the units are pressure on the x axis and crosssectional area (CSA) on the y axis

for each pt we have a set of upto 10 values of pressure and CSA depending on the volume  that has a starting point of 25 cc and increase by 5 cc

 

Patient 1

vol     CSA       Pressure

25     163       7.2

30     161      11.8

35     172      19.5

40     158     32.2

45     165      46.8

50      179      68.1

 

How can I plot using SAS

Reeza
Super User

Please don't post the same question multiple times. In the link I included above, there's an example of plotting multiple series if you look at the Examples Tab. 

 

Or are you trying to make a 3D surface type plot?

 

Are you using SAS UE or a full version of SAS with SAS/GRAPH?

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.

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