Help using Base SAS procedures

How to create multipule plots on one graph?

Reply
Frequent Contributor
Posts: 128

How to create multipule plots on one graph?

Hi, need help,

I want to use PROC GPLOT to create (three plots, one page):

{ plot Freq*rd (when gp=1) } overlay
{ plot Freq*rd (when gp=2) } overlay
{ plot Freq*rd (when gp=3) }

I try the BY statement, but it gives me separated plots. How can I do that?
please see the dataset below
------------------------------------------
rd gp Freq

0.8 1 0.000
1.9 1 0.000
0.6 2 0.448
0.8 2 0.448
1.9 2 0.448
0.6 3 0.000
0.8 3 0.000
1.9 3 0.000


Thank you so much!! Message was edited by: Ken_oy
SAS Super FREQ
Posts: 8,743

Re: How to create multipule plots on one graph?

Hi:
You might look at the GPLOT examples of plotting multiple overlays in one PLOT output. For example, one way to plot multiple lines is to have:
[pre]
plot yvar*xvar=catvar;
...which for your example would seem to be...
plot freq*rd=gp;
[/pre]

cynthia
Frequent Contributor
Posts: 128

Re: How to create multipule plots on one graph?

Thanks!! It works!
Ask a Question
Discussion stats
  • 2 replies
  • 95 views
  • 0 likes
  • 2 in conversation