Data visualization with SAS programming

How to add one second vaxis using sas?

Reply
Contributor
Posts: 36

How to add one second vaxis using sas?

For example, I have one dataset as below. Because y and z have different dimensions, I have to use two vertical axis to represent y*x and z*x plots respectively. It is easy to do in excel (please see the attached figure), but how to do it using sas? Thanks!

data mydata;

input x y z;

datalines;

1          550          100

2          500          200

3          450          300

4          400          400

5          350          500

6          300          600

7          250          700

8          200          800

;

run;

symbol1 v=none INTERPOL=join c=blue width=5;

symbol2 v=none INTERPOL=join c=red width=5;

proc gplot data=mydata;

plot y*x

     z*x/overlay;

run;

quit;

Attachment
SAS Super FREQ
Posts: 889

Re: How to add one second vaxis using sas?

Change the proc to say:

proc gplot data=mydata;

plot y*x;

plot2 z*x;

run;

quit;

Ask a Question
Discussion stats
  • 1 reply
  • 166 views
  • 0 likes
  • 2 in conversation