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

Re: st: Re: Transparent background in graphics


From   [email protected] (Vince Wiggins, StataCorp)
To   [email protected]
Subject   Re: st: Re: Transparent background in graphics
Date   Thu, 20 May 2004 10:59:27 -0500

Fredrik Wallenberg <[email protected]> initiated a thread about
transparent backgrounds in graphs and that led to two sub-threads about the
the undocumented option -bgcolor()- and the behavior of the color -none-.
Let's take those topics in reverse order.

Fredrik's asked why the option -color(none)- in the command

	. twoway (tsline le), ttitle(, color(none))

does not make the time-axis title "invisible".  I agree with Fredrik that
this is an inconsistency and that the title should be turned invisible, that
change will be made in a future update.  Nick Cox <[email protected]> made
the good point that making the title invisible will still leave its place on
the graph, so -title("")-, which will remove and collapse the space for the
title, will still typically be preferred.

Because the next topic is the undocumented -bgcolor()-, I would like to
suggest an undocumented way of making the title invisible -- well, not so much
invisible, but the same color as the background.  Rather than type,

	. ... , ttitle(, color(none))
try, 
	. ... , ttitle(, color("scheme background"))

"What?", you ask.  -scheme background- is not documented as a valid colorstyle
(see help colorstyle).  Its meaning however is fairly self evident -- give me
the color that is used by my current scheme for the background.

Like a few other features of -graph-, the ability to pick colors, or sizes, or
other styles, based on the the settings in the current scheme was not
initially documented.  They were left undocumented because schemes were left
undocumented and no one would know what could reasonably be substituted for
-background- in -scheme backgrounder-.

Schemes, in turn, were left undocumented because we were fairly certain that
we needed some feedback from users before we could settle on how flexible
schemes should be, and that meant that identifiers like -background- might
change.  That turned out to be true and we have received valuable input from a
number of users, particularly from Svend Juul <[email protected]> and Mathew
Barnes <[email protected]>, that led to significant changes in the
organization of schemes.

As it happens, Mathew Barnes of the UK Office for National Statistics, Nick
Cox of the University of Durham, Ulrich Kohler <[email protected]> of WZB
Berlin, and the current poster will be talking about just such things and
other things graphical at the upcoming London User Group meeting in late
August.

Why am I mentioning this undocumented feature now?  Because we believe we now
have adequate feedback and that schemes are stable enough to be documented.
Look for that documentation within the next two weeks in an ado-file update.

We have not yet documented -bgcolor()- because, in the absence of transparent
backgrounds, it does precious little that cannot be done with
-graphregion(color())-.

That brings us full circle, back to Fredrik's original question, "Can I have
transparent backgrounds, please?" We think so, at least for PDF files.  We
have wanted them too.  I expect transparent backgrounds will come and hope
that we will be able to release them in the next few months.


-- Vince
   [email protected]
*
*   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