Graphics Reference
In-Depth Information
of saving scheme-legend3.scheme into the current directory, we save it into our PERSONAL
directory, Stata will be able to find it. (If we have already saved scheme-legend3.scheme
to the current directory and also save it to the PERSONAL directory, we may want to remove
the copy from the current directory.)
So far, this section has really focused on the mechanics of creating a scheme but has not
said much about the possible content that could be placed inside a scheme. This is beyond
the scope of this little introduction, but here are three other places where you can find this
kind of information:
First, the help for schemes via help schemes will tell us about schemes in general. Also,
help scheme files contains documentation about scheme files and what we can change
using schemes.
Second, looking at other schemes can help us find ideas, for example, the downloaded
schemes for this topic (see Appendix : Online supplements (382)). Say that we wanted to look
at the vg rose scheme. We could type which scheme-vg rose.scheme , and that would
tell us where that scheme is located. Then, we could use any editor (including the do-file
editor) to view that scheme for ideas.
Third, we can look at the built-in Stata schemes, such as s1color , s2color ,or economist .
Looking at these schemes shows us the menu of items that we can fiddle with in our own
schemes, but these schemes should never be modified directly. We can use the strategy
outlined above where we make our own scheme and use #include to read in a scheme, and
then we can add our own statements to modify the scheme as desired.
Schemes that other people have created and the schemes built into Stata will contain
statements that control some aspect of a graph, but we may not know which aspect they
control. For example, in the vg rose scheme there is the statement
color
background eggshell
which obviously controls the color of some kind of background element, but we might not
be sure which element it controls. We can find out by making a copy of the scheme and
then changing eggshell to some other nonsubtle value, such as red , and then make a graph
using this new scheme (using scheme( schemename ) ,not set scheme schemename ). The
part of the graph that becomes red will indicate the part that is controlled by the color
background statement.
Of course, we have just scratched the surface of how to create and customize schemes.
However, this should provide the basic tools needed for making a basic scheme, storing
it in the personal directory, and then playing with the scheme. Because schemes are so
powerful, they can appear complicated, but if built slowly and methodically, the process
can be straightforward, logical, and, actually, quite a bit of fun.
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.
Search WWH ::




Custom Search