Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: Fine-tuning -ring- legend placement to avoid overprinting on plot

From   Nick Cox <>
To   "" <>
Subject   Re: st: Fine-tuning -ring- legend placement to avoid overprinting on plot
Date   Sun, 7 Apr 2013 10:05:17 +0100

I see, but that makes it more difficult to provide precise advice.

My own prejudice here is that legends are best necessary evils. If
that's not enough space for the legend within -ring(0)- it has to go
outside or be provided by abbreviations and a longer text caption
written in your word processor or text editor.


On 7 April 2013 09:56,  Andrew Lover <> wrote:
> Nice Cox writes:
>>I don't know why you asked for -pos(2)-. The main place where there is
>>space is in the bottom left-hand corner.
>>legend(size(large) ring(0) pos(7) col(1))
>>separates the legend and the plotted curves.
> Thanks Nick; my apologies; the dummy data doesn't fully illustrate the
> issue; the plot with my real data has empty space only in the pos(2)
> quadrant.
> Dear 'Listers,
> I am trying to 'nudge' the legend key and text to avoid impinging on
> my plot. There's an 'East' etc. option in the graphics editor, but it only
> applies to the text and not the key; the justification options have
> also failed. Any of the graphics gurus out there have any ideas?
> ***** Begin example *****
> net install gr0002_3.pkg // install scheme 'lean2'
> webuse brcancer, clear
> stset rectime, failure(censrec = 1)
> sts graph, by(hormon) ///
> legend(size(large) ring(0) pos(2) justification(right)) ///
> legend(label (1 "Long Category Name") label (2 "Category A")) ///
> legend(label (3 "Category B") label (4 "Category C")) ///
> legend(order(2 3 4 1)) //
> ***** End example *****
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index