BookmarkSubscribeRSS Feed
Ken_oy
Fluorite | Level 6
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
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
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
Ken_oy
Fluorite | Level 6
Thanks!! It works!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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