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

st: Graph background color


From   Friedrich Huebler <huebler@rocketmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Graph background color
Date   Tue, 23 Sep 2003 15:18:26 -0700 (PDT)

The s2color scheme contains the line "color background ltbluishgray".
The s2mono scheme contains the line "color background gs15". This
background color is visible in faint lines around the graphregion
when the graphregion is set to a color different from the background.

. sysuse auto
. set scheme s2color
. graph bar mpg, graphregion(color(white))

The resulting bar graph has fine horizontal lines in the color
"ltbluishgray" at the top and bottom of the graphregion.

When the graph is saved as a Metafile (emf or wmf) and opened in a
Metafile editor, it is possible to see how the graphs are
constructed. The backmost layer is white, the next layer has the
background color determined in the scheme (ltbluishgray or gs15, for
example), and the color of the next layer is determined by the
-graphregion(color())- option. The problem is that the graphregion
does not completely cover the background.

I tried different region_options (lcolor, lwidth, fcolor, margin,
...) but am unable to remove the fine lines in the background color.
The only workable solution that I found is to create a new scheme
based on s2color and to change the line "color background
ltbluishgray" to "color background white" so that it matches the
white graphregion.

Is there a command for changing the background color in a graph or
can this color only changed through a scheme?

Thank you.

Friedrich Huebler

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.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