Date: Mon, 10 May 2010 14:36:50 -0400 Reply-To: Ya Huang Sender: "SAS(r) Discussion" From: Ya Huang Subject: Re: Proc Gplot - Scaling of x-axis Comments: To: Deep Singh Gplot is not good at handling this kind of problem. Sgplot is much better, you can check the post a while back http://listserv.uga.edu/cgi-bin/wa?A2=ind1004d&L=sas-l&O=A&P=18937 If you insist on using gplot, you may have to use annotation, or here is a simpler way, but also has big drawback: axis1 ... order=(0 to 108 by 2); proc format; value xfmt 0,2,4,8,16,24,32,40,48,72,96,108=[best3.] other=' ' ; proc gplot .. plot var1 * var2 = var3 .. format var2 xfmt.; run; The drawback of this method is that since the place left for each ticker metioned above is too small (2 unit), the ticker may wrap to second line, unless you make the font really small. On Mon, 10 May 2010 13:09:36 -0400, Deep wrote: >Hi, > >I have a question regarding scaling of x-axis in proc gplot. I am not sure >how this can be done. > >X-axis values (weeks)- 0,2,4,8,16,24,32,40,48,72,96,108. > >Scaling of weeks on x-axis should be proportional to the difference >between 2 consecutive weeks. e.g. distance between week 2 and week 4 >should be less compared to the distance between week 4 and 8 on x-axis. > > >This is what I have so far. With this code, I get all equidistant points >on x-axis. > > >axis1 > label = (h=2.2 pct "Week") > minor = none > value = (height=1.6 pct) > offset = (0.2 in, 0.2 in) > order = 0 2 4 8 16 24 32 40 48 72 96 108; > >axis2 > label = (h=2.2 pct a=90 "Change from Baseline") > w = 2 > minor = (n=1) > value = (height=1.6 pct) > order = -50 to 575 by 50; > >legend1 position=(top center inside) > mode=protect > value = (height=1.6 pct j=l) > across= 1 > label = (position=top > justify=left h=1.6 pct > "Percentile:") > origin= (10 pct,) > mode = protect > frame ; > >proc gplot data=gfinal; > plot var1 * var2 = var3 / haxis=axis1 vaxis=axis2 legend=legend1; >run ; > > >TIA

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