Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: y axis significant digits


From   "Alan Neustadtl" <[email protected]>
To   [email protected]
Subject   Re: st: y axis significant digits
Date   Sun, 30 Mar 2008 22:18:59 -0400

On easy way is to you the ylabel option with the format suboption.  For example:

sysuse auto, clear
graph twoway (scatter trunk price), ylabel(, format(%5.1f))

Changes the labeled y format to display one decimal place.

You could also use the format command (help format) to change the
format for the variable before plotting it.


Best,
Alan


On Sun, Mar 30, 2008 at 9:55 PM, Chris Witte <[email protected]> wrote:
> Is there a way to control the number of significant digits presented on the y-axis in a twoway scatter plot?  My current graph has values of 1.6, 1.8, 2, 2.2, but I would like to have the "2" be "2.0".  Below is my code (I tried to input the desired values into the ylabel option, but it still just printed "2" instead of "2.0"):
>
>  (connected mmtw time if study=="one" & sex=="f" & trt==8, lcolor(ltblue) lpattern(solid) lwidth(thick) msymbol(point) mcolor(gs13) mlabel(temp) mlabsize(medium) mlabcolor(gs0)), ytitle(Average Female Total Weight (g)) ylabel(1.6 1.8 2.0 2.2, angle(horizontal)) xtitle(Time) xlabel( 1 "Start" 2 "Middle" 3 "End", noticks) legend(off) scheme(s1mono) graphregion(lcolor(none) ilcolor(none)) plotregion(lcolor(none))
>
>  thanks,
>  Chris
>
>
>       ____________________________________________________________________________________
>  Special deal for Yahoo! users & friends - No Cost. Get a month of Blockbuster Total Access now
>  http://tc.deals.yahoo.com/tc/blockbuster/text3.com
>  *
>  *   For searches and help try:
>  *   http://www.stata.com/support/faqs/res/findit.html
>  *   http://www.stata.com/support/statalist/faq
>  *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index