Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: format each label on axis individually


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: RE: format each label on axis individually
Date   Mon, 1 Jul 2013 16:48:13 +0100

Just spell out what you want as literal text:

ylabel (0.01 "0.01" 0.1 "0.1" 1 10 100)

Nick
[email protected]


On 1 July 2013 16:43, Sampson, Mario <[email protected]> wrote:

> The code from Sergiy provides the leading zero for "0.01" and "0.10", but it results in undesired trailing zeros for "0.10" and "1.00". How can I further customize this to provide the following exact labels: "0.01 0.1 1"?

Sergiy Radyakin [[email protected]]

> sysuse auto,clear
> replace mpg=mpg/1000
> twoway scatter mpg price, ylabel(0.01 0.1 1 , labsize(large) format(%04.2f))
> ** eof

 On Mon, Jul 1, 2013 at 2:01 AM, Sampson, Mario <[email protected]> wrote:

>> I have a graph with the following y-axis label "ylabel (0.01 0.1 1 10 100, labsize(large))". However, the leading zeros are not output for 0.01 and 0.1. Instead they are .01 and .1. I can add the zeros using the graph editor. How can I specify to use a leading zero for these two labels using code?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index