Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: How to suppress legend keys


From   Friedrich Huebler <huebler@rocketmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: How to suppress legend keys
Date   Wed, 9 Apr 2003 10:43:00 -0700 (PDT)

How can I suppress legend keys for variables without data? Let me
illustrate this with a meaningless example from the auto data.

. sysuse auto
. scatter headroom rep78 mpg

The scatterplot has a legend with two keys, "Headroom (in.)" and
"Repair Record 1978". Now I replace all values for headroom with
missing values and draw the scatterplot again.

. replace headroom=.
. scatter headroom rep78 mpg

The legend still has two keys although only the repair record appears
in the graph.

Is it possible to instruct Stata to only show keys for data that
appears in the graph? I am thinking of something like "show legend
for headroom if headroom is not missing and show legend for rep78 if
rep78 is not missing".

Thank you,

Friedrich Huebler

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
*
*   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/



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