LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2010, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 31 May 2010 12:54:58 -0400
Reply-To:     Nat Wooding <nathani@VERIZON.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nat Wooding <nathani@VERIZON.NET>
Subject:      Re: Producing 4D scatter plot with Proc G3D
In-Reply-To:  <201005281827.o4SIMhb5011732@malibu.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"

Cristian

As far as I know, there is no way to have G3D fill your symbols, at least in 9.1.3. A solution might be to use Annotate to place filled symbols at the top of the needles.

Nat Wooding

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of P. Cristian Gugiu Sent: Friday, May 28, 2010 2:27 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Producing 4D scatter plot with Proc G3D

Hi all. I'm trying to use Proc G3D to produce a 4D graph by adding color as the fourth dimension. The figure that I produced is ok but I could only find an option of coloring the outline of the cylinder. Does anyone know of a way to improve this figure to make it easier to read?

thanks, Cristian

/* Generate multinomial dataset */ proc IML; call randseed(0); prob = {0.3,0.6,0.1}; n = 5; /* number of trials */ ss = 1000000; /* sample size */ x = RANDMULTINOMIAL(ss,n,prob); S=J(ss,2,0); do i=1 to ss; p=1; do j=1 to nrow(prob); p=p*(prob[j]##x[i,j])/fact(x[i,j]); end; if x[i,3]=0 then S[i,1]=1; S[i,2]=fact(n)*p; end; X=X||S; CREATE Mult FROM X [COLNAME={A B C Success P}]; APPEND FROM X; quit;

/* Append a color code to the fourth dimension (C) */ data Mult; set Mult; length colorval $8. ;

if C=0 then colorval='Red'; else if C=1 then colorval='Orange'; else if C=2 then colorval='DAG'; else if C=3 then colorval='DAB'; else if C=4 then colorval='Brown'; else if C=5 then colorval='Black'; run;

/* Produce scatter plor of A*B=P, where C is color coded */ proc g3d data=Mult; note; scatter A*B=P /color=colorval shape='pillar' size=8 noneedle grid ; run;


Back to: Top of message | Previous page | Main SAS-L page