help scheme scientific(Ariel Linden)

Title

scheme scientific -- Scheme description: scientific

Syntax

schemename Foreground Background Description

scientific monochrome white black on white

For instance, you might type

. graph
...,
...
scheme(scientific)

. set
scheme
scientific
[,
permanently
]

See help scheme_option and help set_scheme.

Description

Schemes determine the overall look of a graph; see help for schemes.

Scheme scientific specifies a graph with certain attributes favored by some scientific journals. That is:

(1) black-and-white

(2) no gridlines

(3) X and Y axes that do not join

(4) Y axis labels that are horizontal

(5) the legend is in the lower right-hand corner outside of the plot area

(6) markers are paired, with the first one solid and the second one hollow

Examples

Load data

. sysuse auto, clear

Simple scatter

. scatter price mpg, sort ylabel(0(5000)20000) xlabel(0(10)50) scheme(scientific)

With by

. scatter price mpg, sort ylabel(0(5000)20000) xlabel(0(10)50) by(foreign) scheme(scientific)

A twoway line graph with a comparison group

. twoway (line mpg weight if foreign, sort)(line mpg weight if !foreign, sort), ylabel(0(10)50) xlabel(1000(1000)5000) legend(label(1 "Foreign") label(2 "Domestic")) scheme(scientific)

(click to run)

A twoway connected graph with multiple comparison groups

. twoway (connected mpg weight if rep78==2,sort)(connected mpg weight if rep78==3,sort)

(connected mpg weight if rep78==4,sort)(connected mpg weight if rep78==5,sort),

ylabel(10(10)50) xlabel(1500(1000)5500) legend(label(1 "rep78=2") label(2 "rep78=3")

label(3 "rep78=4") label(4 "rep78=5")) scheme(scientific)

(click to run)

A bar graph

. graph bar price weight length , over(foreign) scheme(scientific)

A box plot

. graph box mpg, by(for) scheme(scientific)

A stacked multiple comparison-group graph using graph combined

. twoway (connected mpg weight if rep78==2,sort)( connected mpg weight if rep78==3,sort),

ylabel(10(10)50) legend(label(1 "rep78=2") label(2 "rep78=3"))

scheme(scientific) xscale(off) name(rep23, replace)

. twoway (connected mpg weight if rep78==4,sort)( connected mpg weight if rep78==5,sort),

ylabel(10(10)50) xlabel(1500(1000)5500) legend(label(1 "rep78=4") label(2 "rep78=5"))

scheme(scientific) name(rep45,replace)

. graph combine rep23 rep45,cols(1) imargin(b=1 t=1) scheme(scientific)

(click to run)

A survival plot

. webuse drugtr, clear

. stcox age drug

. stcurve, survival at1(drug=1) at2(drug=0) scheme(scientific)

(click to run)

Author

Ariel Linden

President, Linden Consulting Group, LLC

alinden@lindenconsulting.org

http://www.lindenconsulting.org

Also see

Manual: [G] schemes, [G] scheme_option, [G] set scheme

Online: help for schemes, scheme_option, set_scheme, scheme_s2mono