.- help for ^nicenum^ (STB-25: dm28) .- Nice numbers for graph labels ----------------------------- ^nicenum^ macroname = arglist [^if^ exp] [^in^ range] [, ^n^umber^(#)^ ] Description ----------- ^nicenum^ calculates "nice" numbers for labeling axes on graphs. ^nicenum^ determines the range of the values in the ^arglist^ and creates a list of nice numbers that spans the range. By convention, nice numbers are multiples of 2, 5, or 10. The list of numbers, separated by commas, is stored in the global ^macroname^ specified. You can use this macro in the ^xlab^, ^ylab^, ^xline^, or ^yline^ options in a ^graph^ command or anywhere else such a list is useful. The ^arglist^ may mix variables, scalars, and numbers. The ability to include scalars and numbers in the ^arglist^ allows you to force the range to cover specific values regardless of the range covered covered by the variables in the ^arglist^. Options ------- ^number(^#^)^ specifies the desired number of nice numbers in the list. This option is taken as a suggestion rather than a requirement; ^nicenum^ continues to emphasize the niceness of the numbers rather than the number of labels. Examples -------- . ^use auto^ . ^nicenum numlist = weight^ . ^display "$numlist"^ 1000,2000,3000,4000,5000 . ^nicenum numlist = 6000 weight^ . ^display "$numlist"^ 1000,2000,3000,4000,5000,6000 Author ------ James W. Hardin Stata Corporation 702 University Drive East Phone: 409-696-4600 800-782-8272 Fax: 409-696-4601 email: stata@@stata.com Also see -------- STB: STB-25 dm28