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]

st: create a legend for a pie chart with a single obs line


From   tashi lama <[email protected]>
To   <[email protected]>
Subject   st: create a legend for a pie chart with a single obs line
Date   Wed, 2 May 2012 20:16:04 +0000

Hello _all, 

       This might rather sound like a very silly question but I have a good reason to get this. When I have a dataset like following, 

 

hits    id

2        A  

3        B

4        C

 

graph pie hits, over(id) plabel(_all percent)   would give me a pie chart with percent slices and a legend labels A, B and C. But say, if I have only one line of obs and I still want a pie chart, I will get a pie chart, a slice labelled 100% but without legend.

Is there a way to get a legend even if there is only one single observation like following 

 

hits   id 

2       A 

 

and I say, graph pie hits, over(id) plabel(_all percent)

 

 As I said,  this might sound really silly but I have a good reason. Thanks all....

 

Tashi

 

 

   

  

 

  		 	   		  
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index