📄 schemes.hlp
字号:
{smcl}
{* 04mar2005}{...}
{cmd:help schemes}
{hline}
{* index schemes}{...}
{* index schemes, creating your own}{...}
{* index foreground color}{...}
{* index background color}{...}
{* index color, foreground}{...}
{* index color, background}{...}
{title:Title}
{p2colset 5 26 28 2}{...}
{p2col :{hi:[G] schemes intro} {hline 2}}Introduction to schemes{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 16 2}
{cmd:set}
{cmd:scheme}
{it:schemename}
[{cmd:,} {cmdab:perm:anently}]
{p 8 16 2}
{cmdab:gr:aph}
...
[{cmd:,}
...
{cmd:scheme(}{it:schemename}{cmd:)}
...]
{it:schemename}{col 22}foreground{col 34}background{col 46}description
{hline 71}
{bf:{help scheme s2:s2color}}{...}
{col 26}color{...}
{col 38}white{...}
{col 48}{bf:factory setting}
{...}
{bf:{help scheme s2:s2mono}}{...}
{col 24}monochrome{...}
{col 38}white{...}
{col 48}{cmd:s2color} in monochrome
{...}
{bf:{help scheme s2:s2manual}}{...}
{col 24}monochrome{...}
{col 38}white{...}
{col 48}used in the Stata manuals
{bf:{help scheme s2:s2gmanual}}{...}
{col 24}monochrome{...}
{col 38}white{...}
{col 48}used in the Stata [G] manual
{bf:{help scheme s1:s1rcolor}}{...}
{col 26}color{...}
{col 38}black{...}
{col 48}a plain look on black background
{...}
{bf:{help scheme s1:s1color}}{...}
{col 26}color{...}
{col 38}white{...}
{col 48}a plain look
{...}
{bf:{help scheme s1:s1mono}}{...}
{col 24}monochrome{...}
{col 38}white{...}
{col 48}a plain look in monochrome
{...}
{bf:{help scheme s1:s1manual}}{...}
{col 24}monochrome{...}
{col 38}white{...}
{col 48}a plain look, but smaller;
{col 50}used in some Stata manuals
{help scheme economist:{bf:economist}}{...}
{col 26}color{...}
{col 38}white{...}
{col 48}{it:The Economist} magazine
{help scheme sj:{bf:sj}}{...}
{col 24}monochrome{...}
{col 38}white{...}
{col 48}{it:Stata Journal}
{hline 71}
{pin}
Other {it:schemenames} may be available; type
{cmd:.} {bf:{stata graph query, schemes}}
{pin}
to obtain the complete list of schemes installed on your computer.
{title:Description}
{pstd}
A scheme specifies the overall look of the graph.
{pstd}
{cmd:set} {cmd:scheme} sets the default scheme; see
{helpb set scheme} for more information about this command.
{pstd}
Option {cmd:scheme()} specifies the graphics scheme to be used with this
particular {cmd:graph} command without changing the default.
{title:Remarks}
{pstd}
Remarks are presented under the headings
{help schemes##remarks1:The role of schemes}
{help schemes##remarks2:Finding out about other schemes}
{help schemes##remarks3:Setting your default scheme}
{help schemes##remarks4:The scheme is applied at display time}
{help schemes##remarks5:Background color}
{help schemes##remarks6:Foreground color}
{help schemes##remarks7:Obtaining new schemes}
{pstd}
See {help scheme files} for a discussion of how to create your own schemes.
{marker remarks1}{...}
{title:The role of schemes}
{pstd}
When you type, for instance,
{cmd:. scatter yvar xvar}
{pstd}
results are the same as if you typed
{phang2}
{cmd:. scatter yvar xvar, scheme(}{it:your_default_scheme}{cmd:)}
{pstd}
Assuming that you have not used the {cmd:set scheme} command to change your default
scheme, {it:your_default_scheme} is {cmd:s2color}.
{pstd}
The scheme specifies the overall look for the graph, and by that
we mean just about everything you can imagine. It determines such
things as whether {it:y} axes are on the left or the right, how many
values are by default labeled on the axes, and the colors that are
used. In fact, almost every statement made in other parts of this manual
stating how something appears, or the relationship between how things
appear, must not be taken too literally. How things appear is in fact
controlled by the scheme:
{p 8 11 2}
o{space 2}In {it:{help symbolstyle}}, we state that markers{hline 2}the
ink that denotes the position of points on a plot{hline 2}have a default size
of {cmd:msize(medium)} and that small symbols have a size of
{cmd:msize(small)}. That is generally true, but the size of the markers is in
fact set by the scheme, and a scheme might specify different default sizes.
{p 8 11 2}
o{space 2}In {it:{help axis_choice_options}}, we state that when
there is one {it:y axis}, which appears on the left, and when there are two,
the second appears on the right. What is in fact true is that where axes
appear is controlled by the scheme and that most schemes work the way
described. Another scheme named {cmd:economist}, however, displays things
differently.
{p 8 11 2}
o{space 2}In {it:{help title_options}}, we state where the titles,
subtitles, etc., appear, and we provide a diagram so that there can be no
confusion. But where the titles, subtitles, etc., appear is in fact
controlled by the scheme, and what we have described is what is true for
the scheme named {cmd:s2color}.
{pstd}
The list goes on and on.
If it has to do with the look of the result, it is controlled by the scheme.
{pstd}
To understand just how much difference the
scheme can make, you should type
{cmd:. scatter yvar xvar, scheme(economist)}
{pstd}
{cmd:scheme(economist)} specifies a look similar to that used by
{it:{browse "http://www.economist.com":The Economist}}
magazine, whose graphs are worthy of emulation, in our opinion.
By comparison to the {cmd:default} scheme, the {cmd:economist} scheme
moves {it:y} axes to the right,
makes titles left justified,
defaults grid lines to be on,
sets a background color,
and moves the note to the top right and expects it to be a number.
{marker remarks2}{...}
{title:Finding out about other schemes}
{pstd}
A list of schemes is provided in the syntax diagram above, but do not
rely on the list being up to date. Instead, type
{cmd:.} {bf:{stata graph query, schemes}}
{pstd}
to obtain the complete list of schemes installed on your computer.
{pstd}
Try drawing a few graphs with each:
{phang2}
{cmd:. graph} ... {cmd:,} ... {cmd:scheme(}{it:schemename}{cmd:)}
{marker remarks3}{...}
{title:Setting your default scheme}
{pstd}
If you want to set your default scheme to, say, {cmd:economist}, type
{cmd:. set scheme economist}
{pstd}
The {cmd:economist} scheme will now be your default scheme for the rest of this
session, but the next time you use Stata, you will be back to using your old
default scheme. If you type
{cmd:. set scheme economist, permanently}
{pstd}
{cmd:economist} will become your default scheme both for the remainder of
this session and in future sessions.
{pstd}
If you want to change your scheme back to {cmd:default}{hline 2}the default
scheme in Stata as originally shipped{hline 2}type
{cmd:. set scheme default, permanently}
{pstd}
See {helpb set scheme}.
{marker remarks4}{...}
{title:The scheme is applied at display time}
{pstd}
Say that you type
{cmd:. graph mpg weight, saving(mygraph)}
{pstd}
to create and save the file {cmd:mygraph.gph} (see
{it:{help saving_option}}).
If later you redisplay the graph by typing
{cmd:. graph use mygraph}
{pstd}
the graph will reappear as you originally drew it. It will be displayed
using the same scheme with which it was originally drawn, regardless of
your current {cmd:set scheme} setting. If you type
{cmd:. graph use mygraph, scheme(economist)}
{pstd}
the graph will be displayed using the {cmd:economist} scheme. It will be
the same graph but will look different. You can change the scheme with
which a graph is drawn either beforehand, on the original {cmd:graph}
command, or later.
{marker remarks5}{...}
{title:Background color}
{pstd}
In the table at the beginning of the entry, we characterize the background
color as being white or black, although actually what we mean is light or
dark because some of the schemes set background tinting. We mean that
"white" background schemes are suitable for printing. Printers (both the
mechanical ones and the human ones) prefer that you avoid dark backgrounds
because of the large amounts of ink required and the corresponding
problems with bleed-through. On the other hand, dark backgrounds look very
good on monitors.
{pstd}
In any case, you may change the background color of a scheme using the
{it:region_options}
{cmd:graphregion(fcolor())},
{cmd:graphregion(ifcolor())},
{cmd:plotregion(fcolor())}, and
{cmd:plotregion(ifcolor())}; see
{it:{help region_options}}.
When overriding the background color, choose light colors for schemes that
naturally have white backgrounds and dark colors for regions that
naturally have black backgrounds.
{pstd}
Schemes that naturally have a black background are by default printed in
monochrome. See {helpb set printcolor} if you wish to override this.
{pstd}
If you are producing graphs for printing on white paper, we suggest that you
choose a scheme with a naturally white background.
{marker remarks6}{...}
{title:Foreground color}
{pstd}
In the table at the beginning of this entry, we categorized the foreground as
being color or monochrome. This refers to whether lines, markers, fills, etc.,
are presented by default in color or monochrome. Regardless of the scheme you
choose, you can specify options such as {cmd:mcolor()}, {cmd:clcolor()}, etc.,
to control the color for each item on the graph.
{pstd}
Just because we categorized the foreground as monochrome, this does not mean that
you cannot specify colors in the options.
{marker remarks7}{...}
{title:Obtaining new schemes}
{pstd}
Your copy of Stata may already have schemes other than those documented in
this manual. To find out, type
{cmd:.} {bf:{stata graph query, schemes}}
{pstd}
In addition, new schemes are added and existing schemes updated along with
all the rest of Stata, so if you are connected to the Internet, type
{cmd:.} {bf:{stata update query}}
{pstd}
and follow any instructions given; see {helpb update}.
{pstd}
Finally, other users may have created schemes that could be of interest
to you. To search the Internet, type
{cmd:.} {bf:{search scheme, all:findit scheme}}
{it:(will display results in Viewer;}
{it: use Back button to return to this help file)}
{pstd}
From there, you will be able to click to install any schemes that interest
you; see {helpb findit}.
{pstd}
Once a scheme is installed, which can be determined by verifying that it appears
in the list shown by
{cmd:.} {bf:{stata graph query, schemes}}
{pstd}
you can use it with the {cmd:scheme()} option
{phang2}
{cmd:. graph} ...{cmd:,} ... {cmd:scheme(}{it:newscheme}{cmd:)}
{pstd}
or you can set it as your default, temporarily
{cmd:. set scheme} {it:newscheme}
{pstd}
or permanently,
{cmd:. set scheme} {it:newscheme}{cmd:, permanently}
{title:Also see}
{psee}
Manual: {bf:[G] schemes intro}
{psee}
Online:
{it:{help scheme_option}},
{helpb set scheme};
{help scheme economist},
{help scheme s2},
{help scheme s1},
{help scheme sj};
{help scheme files}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -