Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: backgrounf color in pie graph with 'by' option


From   Neil Shephard <[email protected]>
To   [email protected]
Subject   Re: st: backgrounf color in pie graph with 'by' option
Date   Thu, 9 Feb 2006 16:38:15 +0800

On 2/9/06, Fouarge.j. <[email protected]> wrote:
> Hi,
>
> I am trying to generate a pie chart of some variables by categories of another variable as in this example:
>
> sysuse auto
> gen exp = price > 6000
> graph pie exp, over(rep78) by(foreign)
>
> I need the background color to be changed in white. I believe that the way to this is using the graphregion option:
>
> graph pie exp, over(rep78) by(foreign) ///
> graphregion(fc(white))
>
> But this leaves the outer graph region green.
> The above command works fine without the 'by'.

You could try one of the default schemes, perhaps s1color or s2color....

graph pie exp, over(rep78) by(foreign) ///
scheme(s1color)

see -man scheme- for more details, and -findit scheme- will point to a
few custom schemes published in The Stata Journal which may be of
interest (I'm afraid I've not used them so can't comment on them).

HTH's

Neil
--
"Never judge a book by its movie."  - JW Eagan

Email - [email protected]
Website - http://slack.ser.man.ac.uk/
Blog - http://slack---line.blogspot.com/
Flickr - http://www.flickr.com/photos/slackline/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index