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

From |
Seb Buechte <[email protected]> |

To |
[email protected] |

Subject |
Re: st: RE: Formatting macro output in Graphs |

Date |
Mon, 21 Feb 2005 16:24:15 +0100 |

Nick, I got it, thank you a lot! Sebastian On Mon, 21 Feb 2005 15:10:29 -0000, Nick Cox <[email protected]> wrote: > Either way, the string "%8.2f" > is going to be taken literally unless > it is supplied with a context > that interprets it as a format. > > This, for example, would also work: > > twoway function y=x, title("Test-title: `: di %8.2f sqrt(2)'") > > Nick > [email protected] > > Seb Buechte > > > Nick, > > thank you for you help! But after looking over my example in my > > earlier mail I realised that my first workarround and the original > > problem were mixed up! > > > > The NOT-the-desired-results-achieving example should have > > looked like this: > > > > local sqrt2=sqrt(2) > > twoway function y=x , title("SQRT of 2:" %8.2f `sqrt2') > > > > Still, what Nick has posted meets my needs. > > > > Sebastian > > > > On Mon, 21 Feb 2005 14:51:49 -0000, Nick Cox > > <[email protected]> wrote: > > > This is legal once you balance the parentheses. > > > > > > I presume you want something more like > > > > > > local sqrt2 : di %8.2f sqrt(2) > > > twoway function y=x, title("Test-title: `sqrt2'") > > > > > > Nick > > > [email protected] > > > > > > Seb Buechte > > > > > > > we have just come across this question. Is there any > > possibility to > > > > force a certain numeric format when using macros in e.g. > > title-option > > > > of graph? > > > > > > > > this for example DOES NOT work: > > > > > > > > local sqrt2=string(sqrt(2) > > > > > > > > twoway function y=x, title("Test-title:" %8.2f `sqrt2') > > * > * 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/ > -- - Seb F Buechte - - Stay in touch! * * 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/

**References**:**RE: st: RE: Formatting macro output in Graphs***From:*"Nick Cox" <[email protected]>

- Prev by Date:
**st: Re: Having a zero before my comma** - Next by Date:
**Re: st: HLM WITHIN STATA** - Previous by thread:
**RE: st: RE: Formatting macro output in Graphs** - Next by thread:
**st: Robust estimates of panel data** - Index(es):

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