-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbrewschemeExamples.do
More file actions
32 lines (26 loc) · 1.76 KB
/
Copy pathbrewschemeExamples.do
File metadata and controls
32 lines (26 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// You can see the online documentation for other examples, but these should
// give you some ideas of what you can do to create different types of schemes
// using the default themes
// This will use the category 10 palette from D3 with a color intensity of 60
// for all graph types
brewscheme, scheme(sdp2016a) allsty(category10) allc(10) allsat(60)
// If you primarily create bar, pie, and line graphs, you can specify palettes
// for only those types of graphs. We'll assume that bar graphs are used for
// ordinal scale data, pie graphs for nominal scale data, and individual lines
// would be used for different dimensions of a single measure/fact
brewscheme, scheme(sdp2016b) piesty(accent) piec(5) barsty(blues) barc(8) ///
linesty(category10) linec(10) somesty(oranges) somec(6) scatsty(set1) ///
scatc(9) symbols(circle diamond plus square triangle)
// If, however, your organization has style guides that require graph legends
// to appear in the right margin of a graph, we can easily create variants of
// the schemes above by generating custom themes that we pass to brewscheme
brewtheme sdp2016theme, clockdir("legend_position 3") numsty("legend_cols 1" ///
"legend_rows 0" "zyx2rows 0" "zyx2cols 1") barlabelsty("bar none") ///
graphsi("x 5.5" "y 4")
// Now the same two schemes from above can be generated with settings modified
// in a way that affects all graph types (with the exception of the bar label style)
brewscheme, scheme(sdp2016a2) allsty(category10) allc(10) allsat(60) ///
themef(sdp2016theme)
brewscheme, scheme(sdp2016b2) piesty(accent) piec(5) barsty(blues) barc(8) ///
linesty(category10) linec(10) somesty(oranges) somec(6) themef(sdp2016theme) ///
scatsty(set1) scatc(9) symbols(circle diamond plus square triangle)