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: Re: st: labelling specific values on a graph


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: Re: st: labelling specific values on a graph
Date   Thu, 12 Dec 2013 15:44:34 +0000

You don't need a new variable. Just plot selected observations on top
with extra detail.

sysuse auto
scatter mpg weight || scatter mpg weight if weight == 3260, ms(none)
mlabel(make)

Nick
[email protected]


On 12 December 2013 15:34, Ariel Linden <[email protected]> wrote:
> Thanks, Phil. Interesting idea. Unfortunately, the graph now shows the "."
> for the missing values as well. Any suggestions on how to present only the
> numeric values?
>
> Ariel
>
> *** code***
> gen points = .
> replace points = sampsize if inlist( popsize, 100, 1000, 10000, 50000)
>
> *** end code***
>
>
> Date: Wed, 11 Dec 2013 21:51:45 -0500
> From: Phil Schumm <[email protected]>
> Subject: Re: st: labelling specific values on a graph
>
> On Dec 11, 2013, at 9:32 PM, Ariel Linden <[email protected]> wrote:
>> Is there a way to get labels for specific values on a graph (any graph) as
> opposed to all or nothing using mlabel(var)?
>>
>> I would like to highlight a few data points, rather than provide labels to
> all of them.
>
>
> A couple options here, but perhaps the simplest is just to generate a new
> variable containing only those labels you want to expose (with the others
> all set to missing), and pass that to -mlab()-.
>
>
> - -- Phil
>
>
>
> Date: Wed, 11 Dec 2013 21:32:21 -0500
> From: "Ariel Linden" <[email protected]>
> Subject: st: labelling specific values on a graph
>
> Hi All,
>
> Is there a way to get labels for specific values on a graph (any graph) as
> opposed to all or nothing using mlabel(var)?
>
> I would like to highlight a few data points, rather than provide labels to
> all of them.
>
> Thanks!
>
> Ariel
>
>
> *
> *   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/
*
*   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