Example: barber

THE AXIS STATEMENT: YOUR ALLY FOR CONTROLLING …

THE axis STATEMENT: your ally FOR CONTROLLING GRAPHIC TEXT. Arthur L. Carpenter ABSTRACT. axis <statement options>;. One of the strengths of SAS/GRAPH" that you can easily take advantage of is the control that is available for the presentation of lettering and symbols The syntax for axis statement options is similar for in the titles and labels associated with a plot's axis . most of the options. The option name is followed The axis statement is especially useful when precise with an equal sign and the option modifiers are control is needed. The axis statement need not be contained in parentheses following the equal sign. hard to use. However because many of the options Most options can be turned off by using 'none'. are structured differently than in other statements, some users do find it difficult to get the axis axis statement options include: statement to do what they want.

THE AXIS STATEMENT: YOUR ALLY FOR CONTROLLING GRAPHIC TEXT Arthur L. Carpenter ABSTRACT One of the strengths of SAS/GRAPH" that you …

Tags:

  Your, Testament, Controlling, Axis, Ally, The axis statement, Your ally for controlling

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of THE AXIS STATEMENT: YOUR ALLY FOR CONTROLLING …

1 THE axis STATEMENT: your ally FOR CONTROLLING GRAPHIC TEXT. Arthur L. Carpenter ABSTRACT. axis <statement options>;. One of the strengths of SAS/GRAPH" that you can easily take advantage of is the control that is available for the presentation of lettering and symbols The syntax for axis statement options is similar for in the titles and labels associated with a plot's axis . most of the options. The option name is followed The axis statement is especially useful when precise with an equal sign and the option modifiers are control is needed. The axis statement need not be contained in parentheses following the equal sign. hard to use. However because many of the options Most options can be turned off by using 'none'. are structured differently than in other statements, some users do find it difficult to get the axis axis statement options include: statement to do what they want.

2 Minor = (n = 5 h = 1) specifies five minor This paper will provide an introduction to the axis tick marks of a statement, its more common options, and some length of one cell examples of how they can be used. Options and unit. features are available that can turn an ordinary axis into one that becomes an integral part of the graphic. label = none blanks out the label for this axis . Text options include: major = (n=6 h= ) requests six major text can be enhanced by changing the fonts, color, and size. tick marks each with a length of cells. text can be rotated and moved to various positions on the graphic. value = none blanks the values associated with the The axis statement can also be used to control the major tick marks. appearance of the axes of a chart or plot. Options include the ability to: control axis scaling. CHANGING TEXT ORIENTATION WITH. ROTATE= AND ANGLE=.

3 Place special values on the major tick marks. It is often very useful to be able to place axis labels next to the vertical axis of a scatter plot. The specify the number and placement of major and minor tick marks. ROTATE= option applies to individual letters while ANGLE = applies to the entire string. You can also use these options in the axis statement to further control text orientation. axis STATEMENT STRUCTURE. axis labels can be produced using the axis . The axis statement is used to control the statement, and the ANGLE = and ROT A TE = options appearance and scaling of the axes on a plot. This behave in a similar fashion in this statement as they statement can be used in any procedure within do in the TITLE and FOOTNOTE statements. SAS/GRAPH (except G3D) that produces an axis . Unlike SYMBOL and PATTERN statements, the axis axisl label = (f=simplex angle=90 ' , j=c angle=90 h= statement is self contained and is not additive.)

4 It 'Ozone levels at three locations'. takes the form of: j=c angle=-90 rotate=90 h= 834. 'Figure l' ); the logarithmic transformation had been proe gplot data= ; used. plot 03 * month / vaxis=axis1;. title1 '1988 Air Quality Data - Ozone';. footnotel ; LOGBASE selects any base > 1, base run; e (E), or a base equal to n (PI). The LABEL = option is used to define label text within the axis statement. Within the parentheses The following code generates some logarithmic data the options and text strings are arranged as they are and demonstrates what happens when it is plotted for titles and footnotes. with and without using the axis options LOGSTYLE. and LOGBASE. 1988 Air Qual i1y Data - Ozone data logdata;. do x = -1 to 3 by .1;. y= 10 ** x;. output;. end;. axis1 logsty1e=expand 1ogbase=10;. proe gplot data=logdata;. plot y * x;.. o O~ _____ plot Y * x / vaxis=axisl.

5 Symbol1 v=none I=join 1=1;. 1 2 3 .. 5 6 7 8 9 10 '1 12. titlel 'Y = 10' move=(+O,+.S) 'X'i footnotel j=2 h=2 'Figure 2';. runi USING THE LOGARITHM OPTIONS The same data are plotted twice with different options for the vertical axis . Generally speaking axes tend to have equally spaced major and minor tick marks. When data are highly Y - 10: skewed to the right (a few observations with very large values) or to the left (a few observations with 1000. very small values), linearly scaled plots will not show 900. enough detail for a majority of the observations. 800. 700. 600. One approach to this type of problem is to use the 500. logarithmic transformation on the data. This may 400. 300. show the detail, but results in a graph that is not 200. scaled in the original units. The axis statement 100. contains two options that allow the user to plot - 1. actual values against a logarithmic scale.

6 Logarithmic scales do not have equally spaced minor , tick marks, and while the major tick marks are equally spaced, the difference in value between them is not constant. Y = 1 (): 1000 0. The two options that allow logarithmic scaling are LOG STYLE and LOGBASE. LOGSTYLE is used to , select a tick mark and spacing style for the axis and LOGBASE is used to select the logarithmic base. LOGSTYLE=EXPAND results in the unequally spaced minor tick marks. _____ 1. 0.. 1. ~. - 1 3. LOGSTYLE = POWER plots the exponent rather than the actual value. This results in a plot similar to what one would expect if 835. WORKING WITH TICK MARK TEXT t=4 f=swissb 'Apr'. t=5 f=swissb 'May'. STRINGS t=6 'Jun' t=7 'Jul' t=8 'Aug'. t=9 'Sep' t=10 'Oct' t=l1 'Nov'. It is at times useful to replace the tick mark numbers t=12 'Dec ') i on one or both of the axes with textual information. Without using the ANNOTATE facility there are a proc gp10t data=.

7 Where station='SFO';. couple of ways that this can be accomplished. plot 03 * month / vaxis=axisl haxis=axis2. user defined formats vref=2j titlel '1988 Air Quality';. VALUE = option in the axis statement. title2 h= f=simplex 'Assigning tick mark text';. footnotel h= j=l f=simplex Defining and using formats is fairly easy and was the 'Figure 3' i only choice prior to the introduction of the axis run;. statement. It is more difficult to fine tune the final graphic when you use formats. because there is little 1988 Air Quality Assigninq \iok \ .. 1. or no font. size. or color control. This example shows you how to control the tick mark labels using the axis statement where these options are available. By using the axis statement you can define labels for each major tick mark as well as for the axis itself. The VALUE = option in the axis statement allows specific text strings to be associated with specific values and increased control is achieved by making use of font and size options.

8 Jon ftb lh. Ap'..,." ..,. 1101 Jyn Jut Aug Sep oct NQ' Dee Primary control in the VALUE = axis option is exercised by specifically identifying the tick mark number. Usually this implies that the user has In the resulting graphic we have placed the word specified the number of major tick marks ALERT on the vertical axis (replacing the 2) and have (major=(n=12) or order=(1 to 12)). or knows how changed the font and size for the two months of many tick marks there will be. The tick mark is particular interest. designated with the T = option. Attributes for a specific tick mark will immediately follow the The control of the characteristics of tick marks in the appropriate T = option. The user can independently VALUE = statement is positionally dependent. In this control the font. size, and color of the text for each example the AXIS2 statement has a fairly tick mark.

9 Complicated VALUE = option. The default height =. (h ) and font (f = simplex) is established by In this example code the first axis statement (AXIS1) making the specification before aD of the T =. uses t = 3 to identify the tick mark number which will options. As soon as the first T = option is specified. have the string 'Alert' instead of its value (which other options such as H = and F = will apply to the would have been ). AXIS2 defines a default font tick mark designated by the preceding T = option. and height for the axis (h= f=simplex) and also Thus. the font can be changed for T = 4 and T = 5. changes these two options for the fourth and fifth without changing the default font for the other tick tick marks (Apr and May). marks. * define the vertical axis ; Tick mark values are character strings and as such axisl label = (f=duplex h=l a=90. "Ozone Level' ) they can be placed at an angle and have individual order (0 to 3 by 1) characters rotated.

10 The following code places the minor = (n=l) horizontal tick mark labels at an 55 degree angle. value = (t=3 h=l 'Alert');. * axis and pattern control;. * define the horizontal axis * Horizontal axis axis2 label = (f=duplex h=l axisl order= 0 to by .5. 'Monthly Average') style:O. minor = none major=none value = (h= f=simplex minor=none t=l 'Jan' t=2 'Feb' t=3 'Mar' label=(h=2 f=simplex). 836. value=(h= f=simplex a=55) c=black;. offset=(Ocm) ; title1 'Stock Market Analysis of the Dow' ;. * Vertical axis ; title2 h=2 f=simp1ex 'Daily Volume';. axis2 offset=(O em) footnotel j=l h=2 f=simplex 'Figure 5';. order=O to 16 by 2 run;. value=(h= f=simplex) quit;. minor=none;. proc gplot data=plot; This generates the following graph. Note the values plot freq*group=pltvar / used for DATE on the horizontal axis . areas=4. haxis=axisl StcdI: Mar1u1t Ana/y8Ia alb Dow vaxis=axis2 O"ily Volume nolegend; 6000.)


Related search queries