```Date: Wed, 24 Nov 2004 16:21:37 -0500 Reply-To: "Chang Y. Chung" Sender: "SAS(r) Discussion" From: "Chang Y. Chung" Subject: Re: Annotate Comments: To: Tom Hide On Wed, 24 Nov 2004 14:42:05 -0500, Tom Hide wrote: >Hiya > >I am preparing some plots using ANNOTATE >Basically I have 2 sets of plots. > >One is on a linear scale, the other is on a linear-log scale. > >I can produce the linear plots OK with no problems at all, however, I am >having a problem with the second set of plots. > >The x-axis is on the linear scale, so that is no problem. > >I want to plot the actual values on the y-axis, but on a log scale. >(Not the log of the values on a linear scale.) > >Most of the values lie within the range 0.1 to 1 so I want to use a y-axis >of (0.01, 0.1, 1.0) > >I also may need to produce a chart with a y-axis of (0.01, 0.1, 1.0 and 10) > >(a) How do I compute the position of the y-axis tick marks? > >(b) How do I compute the y-position of my value? > >I am not using gplot. I use GSLIDE using the annotate data. > >How does GPLOT do it? Hi, Tom, I don't know how gplot does it, but here is some code that does display points in log10'ed y-axis. The resulting image file is available for browsing at http://changchung.com/g/AnnotateLogAxis.emf HTH. Cheers, Chang /* test data */ data one; input vx vy; cards; 1 0.01 2 0.05 3 0.10 4 1.00 5 3.00 6 8.00 7 57.00 ; run; /* set up the axes */ %let pwd=%sysfunc(pathname(WORK)); %put NOTE: pwd=&pwd.; x cd "&pwd."; data anno; %annomac(nomsg) %dclanno /* y axis */ function = 'move'; x = 10; y = 10; xsys='1'; ysys='1'; /* percentage of data area */ output; function = 'draw'; x = 10; y = 90; output; /* y tick mark */ do y = 20 to 80 by 10; function = 'move'; x = 10; output; function = 'draw'; x = 9; output; end; /* label the y tick marks */ do y = 20 to 80 by 10; function = 'move'; x = 3; output; function = 'label'; size = 2; text = put(10**((y-40)/10),best.); output; end; /* x axis */ function = 'move'; x = 10; y = 10; output; function = 'draw'; x = 90; y = 10; output; /* x tick mark */ do x = 20 to 80 by 10; function = 'move'; y = 10; output; function = 'draw'; y = 8; output; end; /* label the x tick marks */ do x = 20 to 80 by 10; function = 'move'; y = 7; output; function = 'label'; size = 2; text = put(x/10-1, best1.); output; end; /* plot the points */ do until (end); set one; function = 'pie'; rotate = 360; size = 1; x = vx*10 + 10; y = log10(vy) * 10 + 40; output; end; stop; run; filename gout "AnnotatelogAxis.emf"; goptions reset = all hsize=6in vsize=4in hpos=80 vpos=40 device=emf gsfname=gout gsfmode=replace ; proc gslide anno=anno; run; quit; goptions reset=all; ```

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