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