|
|
Fwd: 3D Scatter Plot w. 45degree plane
Hello:
I am interested in overlaying a 3D Scatter plot with a surface plot, where
the surface is a simple 45 degree plane (Y=3DZ) that is placed on the x-axi=
s.
Rob was nice enough to find two SAS exercises that generate these two types
of 3D plots.
How do we overlay them in SAS?
From Rob:
"
Hmm =85 ok, so it sounds like you=92re wanting a g3d scatter like this =85
http://www.ats.ucla.edu/stat/sas/examples/ara/chap3Ex14.gif
With a g3d surface like this (but tilted at a 45 degree angle) =85
http://www.tau.ac.il/cc/pages/docs/sas8/gref/images/01329372.gif
"
|
|
0
|
|
|
|
Reply
|
stats112 (342)
|
11/17/2009 4:57:18 PM |
|
On Nov 17, 11:57=A0am, stats...@GMAIL.COM (OR Stats) wrote:
> Hello:
>
> I am interested in overlaying a 3D Scatter plot with a surface plot, wher=
e
> the surface is a simple 45 degree plane (Y=3D3DZ) that is placed on the x=
-axi=3D
> s.
> Rob was nice enough to find two SAS exercises that generate these two typ=
es
> of 3D plots.
>
> How do we overlay them in SAS?
You could do one with SCATTER/PLOT and the other with annotate.
--
Richard A. DeVenezia
|
|
0
|
|
|
|
Reply
|
Richard
|
11/17/2009 6:50:55 PM
|
|
You can use proc g3d to generate both the 45 degree plane and the
scatter plot, then use proc greplay to overlay them. The trick
is to use 'WHOLE' template:
data hat;
do x=-5 to 5 by 1;
do y=-5 to 5 by 1;
z=sin(sqrt(x*x+y*y));
z1=y;
output;
end;
end;
run;
proc greplay igout=gseg nofs;
delete _all_;
run;
proc g3d data=hat;
plot y*x=z1;
scatter y*z=z;
run;
quit;
proc greplay igout=gseg tc=sashelp.templt nofs;
template=whole;
treplay 1:g3d1 1:g3d;
quit;
Note the treplay 1: & 1:, since there is no other template.
On Tue, 17 Nov 2009 10:57:18 -0600, OR Stats <stats112@GMAIL.COM> wrote:
>Hello:
>
>I am interested in overlaying a 3D Scatter plot with a surface plot, where
>the surface is a simple 45 degree plane (Y=Z) that is placed on the x-axis.
>Rob was nice enough to find two SAS exercises that generate these two types
>of 3D plots.
>
>How do we overlay them in SAS?
>
>From Rob:
>
>"
>
>Hmm ? ok, so it sounds like you?re wanting a g3d scatter like this ?
>
>
>
>http://www.ats.ucla.edu/stat/sas/examples/ara/chap3Ex14.gif
>
>
>
>With a g3d surface like this (but tilted at a 45 degree angle) ?
>
>
>
>http://www.tau.ac.il/cc/pages/docs/sas8/gref/images/01329372.gif
>
>
>"
|
|
0
|
|
|
|
Reply
|
ya.huang (1962)
|
11/17/2009 6:59:33 PM
|
|
Just noticed that axis ticker from plane also overlaid with scatter,
to avoid it, add the noaxis option to the plot statement:
proc g3d data=hat;
plot y*x=z1 / noaxis;
scatter y*z=z;
run;
quit;
On Tue, 17 Nov 2009 13:59:33 -0500, Ya Huang <ya.huang@AMYLIN.COM> wrote:
>You can use proc g3d to generate both the 45 degree plane and the
>scatter plot, then use proc greplay to overlay them. The trick
>is to use 'WHOLE' template:
>
>data hat;
> do x=-5 to 5 by 1;
> do y=-5 to 5 by 1;
> z=sin(sqrt(x*x+y*y));
> z1=y;
> output;
> end;
> end;
>run;
>
>proc greplay igout=gseg nofs;
>delete _all_;
>run;
>
>proc g3d data=hat;
> plot y*x=z1;
> scatter y*z=z;
>run;
>quit;
>
>proc greplay igout=gseg tc=sashelp.templt nofs;
>template=whole;
>treplay 1:g3d1 1:g3d;
>quit;
>
>
>Note the treplay 1: & 1:, since there is no other template.
>
>On Tue, 17 Nov 2009 10:57:18 -0600, OR Stats <stats112@GMAIL.COM> wrote:
>
>>Hello:
>>
>>I am interested in overlaying a 3D Scatter plot with a surface plot, where
>>the surface is a simple 45 degree plane (Y=Z) that is placed on the x-
axis.
>>Rob was nice enough to find two SAS exercises that generate these two
types
>>of 3D plots.
>>
>>How do we overlay them in SAS?
>>
>>From Rob:
>>
>>"
>>
>>Hmm ? ok, so it sounds like you?re wanting a g3d scatter like this ?
>>
>>
>>
>>http://www.ats.ucla.edu/stat/sas/examples/ara/chap3Ex14.gif
>>
>>
>>
>>With a g3d surface like this (but tilted at a 45 degree angle) ?
>>
>>
>>
>>http://www.tau.ac.il/cc/pages/docs/sas8/gref/images/01329372.gif
>>
>>
>>"
|
|
0
|
|
|
|
Reply
|
ya.huang (1962)
|
11/17/2009 7:06:06 PM
|
|
|
3 Replies
489 Views
(page loaded in 0.102 seconds)
|
|
|
|
|
|
|
|
|