Statalist The Stata Listserver

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

Re: st: Another graphics schemes query

From (Vince Wiggins, StataCorp)
Subject   Re: st: Another graphics schemes query
Date   Thu, 31 Aug 2006 16:17:16 -0500

Roger Newson <> asks,

> I have another graphics scheme query. In the file
> scheme-s2color.scheme (distributed with official Stata as the mother
> of all schemes), the first 3 scheme entries are:
> sequence 1210
> label "s2 color"
> system   naturally_white  1
> What do these scheme entries do? I can find no mention, in the
> on-line help tree under "help scheme entries", of scheme entries
> whose attribute is "sequence", "label" or "system". However, based
> on their position in the scheme file, I can't help thinking that
> they must be doing something important that I ought to know.

This is a case where being mentioned first does not designate a place of
honor.  Roger can safely ignore these lines with little repercussion.  They
are not standard "scheme entries" that define how objects are rendered on the

The  lines

    sequence 1210
    label "s2 color"

are used solely by the dialog system to determine how to display the items in
the control that allows you to select the scheme for the graph.  The dialog
box for every graph command has a pull-down list on the "Overall" tab that
lets you select the scheme under which you want the graph drawn.  

This list includes not only the official schemes shipped with Stata, but also
any user-written schemes that can be found along your ado path.  The label, in
this case "s2 color", is what you want displayed for your scheme in that list.
If you not supply a label, then the scheme's filename is used.

The sequence line just determines where in the pull-down list your scheme
occurs.  If you do not supply a sequence, your new scheme will appear at the
bottom of the list.

The line

    system naturally_white  1

tells the graphics system whether your scheme has a naturally white or
naturally black background.  This is used only when a color is attenuated by
using the multiplier syntax, e.g. color(red*.3), and when a color scheme is
printed in grayscale.  When attenuating colors, the system needs to know if
the scheme is naturally white (meaning mix in white to attenuate colors) or
naturally black (meaning to mix in black).

You can find out more about "naturally white" in -help schemes- and 
-help graph display.  Also see, -help set printcolor- for how this setting
affects printing color schemes to grayscale.

Roger needn't concern himself about this setting, nor should any other
prospective scheme writers, because all user-written schemes should use a
-#include- statement to start themselves from an existing scheme.  The
existing scheme will set naturally_white appropriately.  Only if you wanted to
change the background color from say white to black and necessarily virtually
all foreground colors from dark to light colors would you consider resetting
naturally_white.  In such cases, it would be better to start from a scheme
that already had a naturally black background.

-- Vince

*   For searches and help try:

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