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: Labeling series within the plot area


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Labeling series within the plot area
Date   Fri, 30 Nov 2012 00:51:35 +0000

Another technique is to use marker labels on the last value in a time series.

webuse grunfeld

xtline invest, overlay ysc(log)

The legend is a problem. It takes up too much space.

xtline invest, overlay ysc(log) ///
addplot(scatter invest year if year == 1954, ms(i) mla(company)
legend(off) mlabcolor(black)) ///
yla(1000 100 10 1, ang(h))

The marker labels by default are at clock position 3 pm, exactly right
for this problem.

With more work, you could get different colours. Naturally, this is
best for short text labels only.

See also

Cox, N.J. 2011. Stata tip 104: Added text and title options. Stata
Journal 11(4):  632-633

Nick

On Thu, Nov 29, 2012 at 8:31 PM, William Buchanan
<[email protected]> wrote:

You might want to look at the added-text/text-box options.  It might
take a little bit to get the placement just right, but that would be a
way to do it.

On Nov 29, 2012, at 12:28 PM, [email protected] wrote:

>> When creating graphs (using a do-file, not the Graph Editor), is there a
>> way to label the data series in the plot area, so the name of the series
>> would appear near the line that is plotted? Here is an example:
>> http://libertystreeteconomics.typepad.com/.a/6a01348793456c970c017d3dfcdf73970c-popup
*
*   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