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 (January 2012, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 9 Jan 2012 16:43:30 -0800
Reply-To:     Fareeza Khurshed <fkhurshed@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Fareeza Khurshed <fkhurshed@GMAIL.COM>
Subject:      Re: GPLOT to SGPLOT
Comments: To: siddharth <sidhu871@gmail.com>
In-Reply-To:  <CACnrJvaCFHJJeEiSwEJZoa=CW+om1OOBjNp8_14J3EZdRrE1=A@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Have you tried multiple SERIES statements with the markers option, rather than a scatter as well?

PROC SGPLOT DATA=covplot1;; SERIES Y=estimate X=lag / GROUP=time2 DATALABEL markers; SERIES Y=cov_cs X=lag / GROUP=time2 DATALABEL markers; YAXIS LABEL= 'Covariance of Between Subject Effects' VALUES=(1 TO 4.5 BY 0.5); XAXIS LABEL= 'Lag' VALUES=(-1 TO 7 BY 1.0); *offsetmin=.5 offsetmax=.5; RUN;

On Mon, Jan 9, 2012 at 4:29 PM, siddharth <sidhu871@gmail.com> wrote:

> In that case use. > > > Proc SGScatter data= your.Data; > Compare x= Your independent variable; > y= Your dependent variable; > run; > > * > * > *Tell me if this worked! I'm learning SAS!* > Siddharth K. Lokineni > > > > On Mon, Jan 9, 2012 at 7:14 PM, Thomas Schmitt <schmitta1573@gmail.com > >wrote: > > > Hi Siddharth, > > > > I couldn't get it to work. I should have mentioned the result of this is > > a scatter-plot or line-graph. The data is below. I've used the following > > code to do single variables with a grouping factor, but can't figure it > out > > for this situation with multiple variables and specifying the group ( in > > this case selecting based on lag and lag2). > > > > PROC SGPLOT DATA=covplot1;; > > SCATTER Y=estimate X=lag / GROUP=time2; > > SERIES Y=estimate X=lag / GROUP=time2 DATALABEL; > > YAXIS LABEL= 'Covariance of Between Subject Effects' VALUES=(1 TO 4.5 BY > > 0.5); > > XAXIS LABEL= 'Lag' VALUES=(-1 TO 7 BY 1.0); *offsetmin=.5 offsetmax=.5; > > RUN; > > > > Obs lag cov_toep cov_cs cov_ar cov_arre time2 > > lag2 cov_un > > > > 1 0 3.26623 3.43438 3.35339 3.37978 1 > > 0 2.6069 > > 2 1 2.38581 2.30470 2.48434 2.48178 1 > > 1 1.3595 > > 3 2 2.34148 2.30470 1.84051 2.21797 2 > > 0 2.8468 > > 4 3 2.12121 2.30470 1.36353 2.14047 1 > > 2 1.5410 > > 5 4 1.90350 2.30470 1.01016 2.11770 2 > > 1 2.1370 > > 6 5 1.71573 2.30470 0.74837 2.11102 3 > > 0 3.2818 > > 7 6 1.53185 2.30470 0.55443 2.10905 1 > > 3 1.2908 > > 8 7 1.32649 2.30470 0.41074 2.10847 2 > > 2 2.4020 > > 9 . . . . . 3 > > 1 2.4234 > > 10 . . . . . 4 > > 0 3.7831 > > 11 . . . . . 1 > > 4 1.4094 > > 12 . . . . . 2 > > 3 2.2814 > > 13 . . . . . 3 > > 2 2.7668 > > 14 . . . . . 4 > > 1 2.9711 > > 15 . . . . . 5 > > 0 3.8001 > > 16 . . . . . 1 > > 5 1.2963 > > 17 . . . . . 2 > > 4 2.1165 > > 18 . . . . . 3 > > 3 2.6065 > > 19 . . . . . 4 > > 2 2.8731 > > 20 . . . . . 5 > > 1 3.1373 > > 21 . . . . . 6 > > 0 3.8498 > > 22 . . . . . 1 > > 6 1.2774 > > 23 . . . . . 2 > > 5 2.1395 > > 24 . . . . . 3 > > 4 2.3698 > > 25 . . . . . 4 > > 3 2.9590 > > 26 . . . . . 5 > > 2 3.0574 > > 27 . . . . . 6 > > 1 3.1169 > > 28 . . . . . 7 > > 0 3.7294 > > 29 . . . . . 1 > > 7 1.1623 > > 30 . . . . . 2 > > 6 1.9635 > > 31 . . . . . 3 > > 5 2.2247 > > 32 . . . . . 4 > > 4 2.7914 > > 33 . . . . . 5 > > 3 2.8179 > > 34 . . . . . 6 > > 2 2.9367 > > 35 . . . . . 7 > > 1 3.1267 > > 36 . . . . . 8 > > 0 3.5806 > > > > > > > > > > On Mon, Jan 9, 2012 at 6:46 PM, siddharth <sidhu871@gmail.com> wrote: > > > >> Proc SGplot data=covplot2; > >> histogram XXX; */* in place of variable xxx provide your variable > >> ... also you can change histogram for hbox (horizontal box plot)*/* > >> run; > >> > >> tell me if this works. > >> All the best. > >> > >> > >> > >> Siddharth K. Lokineni > >> > >> > >> > >> > >> On Mon, Jan 9, 2012 at 6:36 PM, Thomas Schmitt <schmitta1573@gmail.com> > >> wrote: > >> > Hi SASers, > >> > > >> > Does anyone know how to translate the code below into SGPLOT? > >> > > >> > Thanks, > >> > > >> > Tom > >> > > >> > > >> > proc gplot data=covplot2; > >> > plot cov_ar *lag=1 > >> > cov_arre*lag=2 > >> > cov_cs *lag=3 > >> > cov_toep*lag=4 > >> > cov_un *lag2=5 / overlay > >> > noframe > >> > vaxis=axis1 > >> > haxis=axis2 > >> > legend=legend1; > >> > run; > >> > quit; > >> > >> > > >


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