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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: Add variable value on a graph |

Date |
Wed, 27 Aug 2008 14:58:14 +0100 |

The persuasion Martin suggests is unnecessary. You can add text to a -line- graph using -text()-. Or you can put the same text in a title or the legend. Here is a dopey example. . sysuse auto . sort weight mpg . line weight mpg, text(3000 25 "some text") If Alvine's problem were mine, I'd probably use -t1title()-. This is best done as a loop, e.g. levelsof id, local(IDS) foreach ID of local IDS { su BMI if id == `ID', meanonly line hem time, t1title(`r(min)') } Nick n.j.cox@durham.ac.uk Martin Weiss If you could be persuaded to use a -scatter- instead of -line-, then -help scatter##marker_options- shows that you can add the value of a variable of your choice to the marker symbols... alvine.bissery@chu-lyon.fr I would like to create a graph with repeated values of hemoglobin versus time (0,1,2,6 and 12 months) for each subject of my data . gr twoway (line hem time) if id==1 I have a variable "BMI" in my data base which gives the BMI of each subject. I would like to add the value of BMI on each graph for each subject (as legend) . Is it possible to add on a plot the value of a variable ? * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE : RE: RE: Add variable value on a graph***From:*alvine.bissery@chu-lyon.fr

**References**:**st: Add variable value on a graph***From:*alvine.bissery@chu-lyon.fr

**st: RE: Add variable value on a graph***From:*"Martin Weiss" <martin.weiss@uni-tuebingen.de>

- Prev by Date:
**RE: st: RE: bihistogram** - Next by Date:
**Re: st: Re: question inspired by ivreg2** - Previous by thread:
**st: RE: Add variable value on a graph** - Next by thread:
**st: RE : RE: RE: Add variable value on a graph** - Index(es):

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