Hi everyone,
I am trying to plot a 3-D graph. I have 3 variables and I need to represent those point in a 3-D graph, Can anyone help me please???
Thanks in advance.
Miguel.
---------------------------------
Correo Yahoo!
Comprueba qu� es nuevo, aqu�
http://correo.yahoo.es
|
|
0
|
|
|
|
Reply
|
miguel_hoz (74)
|
11/8/2005 9:44:26 PM |
|
ok, then...
I have a file with names of people and 3 variables to describe each person (var1, var2, var3).
I am trying to plot a 3-D plot, the axis X with var1, axis Y with var2 and axis Z with var3. So my intention is to see in the same plot.
I tried,
proc gplot;
plot x*y=z;
run;
quit;
but it is a bidemensional graph, I need to build 3 dimensions.
Many thanks.
Miguel.
bill_droogendyk@dofasco.ca escribi�:
Miguel;
always helpful to give us more explanation of what it is that you are trying to do. My guess would be that you could use ..
proc gplot;
plot x*y=z;
run;
quit;
Look for examples at www.sas.com under tech support
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Miguel de la Hoz
Sent: 08 November, 2005 16:44
To: SAS-L@LISTSERV.UGA.EDU
Subject: 3-D graphs
Hi everyone,
I am trying to plot a 3-D graph. I have 3 variables and I need to represent those point in a 3-D graph, Can anyone help me please???
Thanks in advance.
Miguel.
---------------------------------
Correo Yahoo!
Comprueba qu� es nuevo, aqu�
http://correo.yahoo.es
---------------------------------
Correo Yahoo!
Comprueba qu� es nuevo, aqu�
http://correo.yahoo.es
|
|
0
|
|
|
|
Reply
|
miguel_hoz (74)
|
11/8/2005 10:02:05 PM
|
|
You will need to use PROC G3D to get the graph you are looking for. The
only problem with G3D is that it will plot only the highest Z value for
same combinations of X and Y. This can be solved by adding a small fuzz
value to the X or Y values before plotting.
So, try something like the attached code. I will let you look at the
options in the documentation to set up plot options. Some of the options
you can play around with is to set different size of symbols based on
values of another variable. If there are many points to plot, I am not
sure if this plot will look good. Give it a spin (use at your own risk):
%let options=;
%macro threedscat(data,xvar,yvar,zvar);
data _null_;
set &data end=eof;
retain minz 9E6;
minz = min(minz,&zvar);
if eof then call symput('zmin',put(minz,best12.));
run;
data prep;
set &data;
retain increment 1;
if &zvar > &zmin then do;
&xvar=&xvar + 1E-6*increment;
increment=increment+.01;
end;
proc g3d data=prep;
scatter &yvar*&xvar=&zvar
/ &options
;
run;quit;
%mend;
Jonas V. Bilenas
On Tue, 8 Nov 2005 23:02:05 +0100, Miguel de la Hoz <miguel_hoz@YAHOO.ES>
wrote:
>ok, then...
>
>I have a file with names of people and 3 variables to describe each person
(var1, var2, var3).
>
>I am trying to plot a 3-D plot, the axis X with var1, axis Y with var2 and
axis Z with var3. So my intention is to see in the same plot.
>
>I tried,
>proc gplot;
>plot x*y=z;
>run;
>quit;
>
>but it is a bidemensional graph, I need to build 3 dimensions.
>Many thanks.
>
>Miguel.
>
>
>
>bill_droogendyk@dofasco.ca escribi�:
>Miguel;
>
>always helpful to give us more explanation of what it is that you are
trying to do. My guess would be that you could use ..
>
>proc gplot;
>plot x*y=z;
>run;
>quit;
>
>Look for examples at www.sas.com under tech support
>
>-----Original Message-----
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Miguel de la Hoz
>Sent: 08 November, 2005 16:44
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: 3-D graphs
>
>
>Hi everyone,
>
>I am trying to plot a 3-D graph. I have 3 variables and I need to
represent those point in a 3-D graph, Can anyone help me please???
>
>Thanks in advance.
>
>Miguel.
>
>
>---------------------------------
>
>Correo Yahoo!
>Comprueba qu� es nuevo, aqu�
>http://correo.yahoo.es
>
>
>---------------------------------
>
>Correo Yahoo!
>Comprueba qu� es nuevo, aqu�
>http://correo.yahoo.es
|
|
0
|
|
|
|
Reply
|
jonas.bilenas (222)
|
11/9/2005 12:44:51 PM
|
|
Be sure and try the ACTIVEX gdevice for these if you're on a windows platform, and use ODS to output HTML. Doing so gets you the ability to rotate the point cloud interactively w/your mouse. I just love that...
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Jonas Bilenas
Sent: Wednesday, November 09, 2005 4:45 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: 3-D graphs
You will need to use PROC G3D to get the graph you are looking for. The only problem with G3D is that it will plot only the highest Z value for same combinations of X and Y. This can be solved by adding a small fuzz value to the X or Y values before plotting.
So, try something like the attached code. I will let you look at the options in the documentation to set up plot options. Some of the options you can play around with is to set different size of symbols based on values of another variable. If there are many points to plot, I am not sure if this plot will look good. Give it a spin (use at your own risk):
%let options=;
%macro threedscat(data,xvar,yvar,zvar);
data _null_;
set &data end=eof;
retain minz 9E6;
minz = min(minz,&zvar);
if eof then call symput('zmin',put(minz,best12.)); run;
data prep;
set &data;
retain increment 1;
if &zvar > &zmin then do;
&xvar=&xvar + 1E-6*increment;
increment=increment+.01;
end;
proc g3d data=prep;
scatter &yvar*&xvar=&zvar
/ &options
;
run;quit;
%mend;
Jonas V. Bilenas
On Tue, 8 Nov 2005 23:02:05 +0100, Miguel de la Hoz <miguel_hoz@YAHOO.ES>
wrote:
>ok, then...
>
>I have a file with names of people and 3 variables to describe each
>person
(var1, var2, var3).
>
>I am trying to plot a 3-D plot, the axis X with var1, axis Y with var2
>and
axis Z with var3. So my intention is to see in the same plot.
>
>I tried,
>proc gplot;
>plot x*y=z;
>run;
>quit;
>
>but it is a bidemensional graph, I need to build 3 dimensions.
>Many thanks.
>
>Miguel.
>
>
>
>bill_droogendyk@dofasco.ca escribi�:
>Miguel;
>
>always helpful to give us more explanation of what it is that you are
trying to do. My guess would be that you could use ..
>
>proc gplot;
>plot x*y=z;
>run;
>quit;
>
>Look for examples at www.sas.com under tech support
>
>-----Original Message-----
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Miguel de la Hoz
>Sent: 08 November, 2005 16:44
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: 3-D graphs
>
>
>Hi everyone,
>
>I am trying to plot a 3-D graph. I have 3 variables and I need to
represent those point in a 3-D graph, Can anyone help me please???
>
>Thanks in advance.
>
>Miguel.
>
>
>---------------------------------
>
>Correo Yahoo!
>Comprueba qu� es nuevo, aqu�
>http://correo.yahoo.es
>
>
>---------------------------------
>
>Correo Yahoo!
>Comprueba qu� es nuevo, aqu�
>http://correo.yahoo.es
|
|
0
|
|
|
|
Reply
|
pardee.r (1272)
|
11/9/2005 8:46:59 PM
|
|
|
3 Replies
28 Views
(page loaded in 0.086 seconds)
|