PlotThemes Workshop

Brett Champion & Tim Shedelbower

Wolfram Research

init

SetAttributes[CompareTheme,HoldAll]

CompareTheme[p_List,t_:"Classic"]:=Style[
Grid[Transpose[{
Prepend[
Style[#,Graphics3DBoxOptions->{Lighting->"Classic"}]&/@Block[{$PlotTheme=t},p],
Style["V9","Subsubsection"]
],
Prepend[p,
Style["V10","Subsubsection"]
]
}]
],
ImageSizeMultipliers->{1, 1}
]

CompareTheme[p_,t_:"Classic"]:=CompareTheme[{p},t]

apple={{{2014,1,2},77.73`},{{2014,1,3},76.02`},{{2014,1,6},76.43`},{{2014,1,7},75.89`},{{2014,1,8},76.37`},{{2014,1,9},75.39`},{{2014,1,10},74.89`},{{2014,1,13},75.28`},{{2014,1,14},76.78`},{{2014,1,15},78.32`},{{2014,1,16},77.88`},{{2014,1,17},75.97`},{{2014,1,21},77.15`},{{2014,1,22},77.5`},{{2014,1,23},78.15`},{{2014,1,24},76.73`},{{2014,1,27},77.36`},{{2014,1,28},71.17`},{{2014,1,29},70.37`},{{2014,1,30},70.23`},{{2014,1,31},70.34`},{{2014,2,3},70.47`},{{2014,2,4},71.49`},{{2014,2,5},72.03`},{{2014,2,6},72.45`},{{2014,2,7},73.46`},{{2014,2,10},74.78`},{{2014,2,11},75.76`},{{2014,2,12},75.76`},{{2014,2,13},76.96`},{{2014,2,14},76.9`},{{2014,2,18},77.18`},{{2014,2,19},75.96`},{{2014,2,20},75.08`},{{2014,2,21},74.25`},{{2014,2,24},74.57`},{{2014,2,25},73.8`},{{2014,2,26},73.13`},{{2014,2,27},74.59`},{{2014,2,28},74.39`},{{2014,3,3},74.6`},{{2014,3,4},75.1`},{{2014,3,5},75.25`},{{2014,3,6},75.03`},{{2014,3,7},74.98`},{{2014,3,10},75.05`},{{2014,3,11},75.78`},{{2014,3,12},75.86`},{{2014,3,13},75.01`},{{2014,3,14},74.17`},{{2014,3,17},74.46`},{{2014,3,18},75.12`},{{2014,3,19},75.1`},{{2014,3,20},74.74`},{{2014,3,21},75.33`},{{2014,3,24},76.22`},{{2014,3,25},77.04`},{{2014,3,26},76.3`},{{2014,3,27},75.98`},{{2014,3,28},75.89`},{{2014,3,31},75.87`},{{2014,4,1},76.57`},{{2014,4,2},76.7`},{{2014,4,3},76.16`},{{2014,4,4},75.18`},{{2014,4,7},74.`},{{2014,4,8},73.99`},{{2014,4,9},74.97`},{{2014,4,10},74.`},{{2014,4,11},73.45`},{{2014,4,14},73.74`},{{2014,4,15},73.22`},{{2014,4,16},73.37`},{{2014,4,17},74.21`},{{2014,4,21},75.09`},{{2014,4,22},75.16`},{{2014,4,23},74.18`},{{2014,4,24},80.26`},{{2014,4,25},80.85`},{{2014,4,28},83.98`},{{2014,4,29},83.73`},{{2014,4,30},83.42`},{{2014,5,1},83.61`},{{2014,5,2},83.77`},{{2014,5,5},84.95`},{{2014,5,6},84.03`},{{2014,5,7},83.73`},{{2014,5,8},83.58`},{{2014,5,9},83.23`},{{2014,5,12},84.27`},{{2014,5,13},84.4`},{{2014,5,14},84.42`},{{2014,5,15},83.7`},{{2014,5,16},84.94`},{{2014,5,19},85.94`},{{2014,5,20},85.96`},{{2014,5,21},86.19`},{{2014,5,22},86.32`},{{2014,5,23},87.3`},{{2014,5,27},88.93`},{{2014,5,28},88.7`},{{2014,5,29},90.32`},{{2014,5,30},89.98`},{{2014,6,2},89.36`},{{2014,6,3},90.63`},{{2014,6,4},91.66`},{{2014,6,5},92.02`},{{2014,6,6},91.77`},{{2014,6,9},93.24`},{{2014,6,10},93.78`},{{2014,6,11},93.4`},{{2014,6,12},91.83`},{{2014,6,13},90.83`},{{2014,6,16},91.74`},{{2014,6,17},91.62`},{{2014,6,18},91.72`},{{2014,6,19},91.41`},{{2014,6,20},90.46`},{{2014,6,23},90.38`},{{2014,6,24},89.83`},{{2014,6,25},89.91`},{{2014,6,26},90.45`},{{2014,6,27},91.52`},{{2014,6,30},92.47`},{{2014,7,1},93.06`},{{2014,7,2},93.02`},{{2014,7,3},93.56`},{{2014,7,7},95.5`},{{2014,7,8},94.88`},{{2014,7,9},94.92`},{{2014,7,10},94.57`},{{2014,7,11},94.75`},{{2014,7,14},95.97`},{{2014,7,15},94.85`},{{2014,7,16},94.31`},{{2014,7,17},92.63`},{{2014,7,18},93.96`},{{2014,7,21},93.48`},{{2014,7,22},94.25`},{{2014,7,23},96.71`},{{2014,7,24},96.55`},{{2014,7,25},97.19`},{{2014,7,28},98.53`},{{2014,7,29},97.89`},{{2014,7,30},97.66`},{{2014,7,31},95.13`},{{2014,8,1},95.65`},{{2014,8,4},95.12`},{{2014,8,5},94.65`},{{2014,8,6},94.49`},{{2014,8,7},94.48`},{{2014,8,8},94.74`},{{2014,8,11},95.99`},{{2014,8,12},95.97`},{{2014,8,13},97.24`},{{2014,8,14},97.5`},{{2014,8,15},97.98`},{{2014,8,18},99.16`},{{2014,8,19},100.53`},{{2014,8,20},100.57`},{{2014,8,21},100.58`},{{2014,8,22},101.32`},{{2014,8,25},101.54`},{{2014,8,26},100.89`},{{2014,8,27},102.13`},{{2014,8,28},102.25`},{{2014,8,29},102.5`},{{2014,9,2},103.3`},{{2014,9,3},98.94`},{{2014,9,4},98.12`},{{2014,9,5},98.97`},{{2014,9,8},98.36`},{{2014,9,9},97.99`},{{2014,9,10},101.`},{{2014,9,11},101.43`},{{2014,9,12},101.66`},{{2014,9,15},101.63`},{{2014,9,16},100.86`},{{2014,9,17},101.58`},{{2014,9,18},101.79`},{{2014,9,19},100.96`},{{2014,9,22},101.06`},{{2014,9,23},102.64`},{{2014,9,24},101.75`},{{2014,9,25},97.87`},{{2014,9,26},100.75`},{{2014,9,29},100.11`},{{2014,9,30},100.75`},{{2014,10,1},99.18`},{{2014,10,2},99.9`},{{2014,10,3},99.62`},{{2014,10,6},99.62`},{{2014,10,7},98.75`},{{2014,10,8},100.8`},{{2014,10,9},101.02`},{{2014,10,10},100.73`},{{2014,10,13},99.81`},{{2014,10,14},98.75`},{{2014,10,15},97.54`},{{2014,10,16},96.26`},{{2014,10,17},97.67`},{{2014,10,20},99.76`},{{2014,10,21},102.47`}};
msft={{{2014,1,2},36.4`},{{2014,1,3},36.15`},{{2014,1,6},35.39`},{{2014,1,7},35.66`},{{2014,1,8},35.03`},{{2014,1,9},34.8`},{{2014,1,10},35.3`},{{2014,1,13},34.26`},{{2014,1,14},35.05`},{{2014,1,15},36.01`},{{2014,1,16},36.13`},{{2014,1,17},35.63`},{{2014,1,21},35.43`},{{2014,1,22},35.19`},{{2014,1,23},35.32`},{{2014,1,24},36.05`},{{2014,1,27},35.29`},{{2014,1,28},35.53`},{{2014,1,29},35.91`},{{2014,1,30},36.1`},{{2014,1,31},37.06`},{{2014,2,3},35.73`},{{2014,2,4},35.6`},{{2014,2,5},35.09`},{{2014,2,6},35.44`},{{2014,2,7},35.81`},{{2014,2,10},36.05`},{{2014,2,11},36.41`},{{2014,2,12},36.7`},{{2014,2,13},36.84`},{{2014,2,14},36.85`},{{2014,2,18},36.93`},{{2014,2,19},37.02`},{{2014,2,20},37.25`},{{2014,2,21},37.48`},{{2014,2,24},37.19`},{{2014,2,25},37.05`},{{2014,2,26},36.98`},{{2014,2,27},37.36`},{{2014,2,28},37.81`},{{2014,3,3},37.28`},{{2014,3,4},37.9`},{{2014,3,5},37.61`},{{2014,3,6},37.65`},{{2014,3,7},37.4`},{{2014,3,10},37.32`},{{2014,3,11},37.52`},{{2014,3,12},37.77`},{{2014,3,13},37.39`},{{2014,3,14},37.2`},{{2014,3,17},37.55`},{{2014,3,18},39.03`},{{2014,3,19},38.75`},{{2014,3,20},39.8`},{{2014,3,21},39.63`},{{2014,3,24},39.97`},{{2014,3,25},39.81`},{{2014,3,26},39.27`},{{2014,3,27},38.84`},{{2014,3,28},39.77`},{{2014,3,31},40.45`},{{2014,4,1},40.87`},{{2014,4,2},40.81`},{{2014,4,3},40.47`},{{2014,4,4},39.34`},{{2014,4,7},39.28`},{{2014,4,8},39.3`},{{2014,4,9},39.94`},{{2014,4,10},38.84`},{{2014,4,11},38.69`},{{2014,4,14},38.66`},{{2014,4,15},39.23`},{{2014,4,16},39.87`},{{2014,4,17},39.48`},{{2014,4,21},39.41`},{{2014,4,22},39.46`},{{2014,4,23},39.17`},{{2014,4,24},39.34`},{{2014,4,25},39.38`},{{2014,4,28},40.33`},{{2014,4,29},39.98`},{{2014,4,30},39.87`},{{2014,5,1},39.47`},{{2014,5,2},39.17`},{{2014,5,5},38.91`},{{2014,5,6},38.55`},{{2014,5,7},38.9`},{{2014,5,8},39.12`},{{2014,5,9},39.02`},{{2014,5,12},39.44`},{{2014,5,13},40.17`},{{2014,5,14},39.99`},{{2014,5,15},39.35`},{{2014,5,16},39.58`},{{2014,5,19},39.5`},{{2014,5,20},39.43`},{{2014,5,21},40.1`},{{2014,5,22},39.85`},{{2014,5,23},39.87`},{{2014,5,27},39.94`},{{2014,5,28},39.76`},{{2014,5,29},40.09`},{{2014,5,30},40.69`},{{2014,6,2},40.54`},{{2014,6,3},40.04`},{{2014,6,4},40.07`},{{2014,6,5},40.95`},{{2014,6,6},41.22`},{{2014,6,9},41.01`},{{2014,6,10},40.85`},{{2014,6,11},40.61`},{{2014,6,12},40.33`},{{2014,6,13},40.97`},{{2014,6,16},41.24`},{{2014,6,17},41.42`},{{2014,6,18},41.39`},{{2014,6,19},41.25`},{{2014,6,20},41.42`},{{2014,6,23},41.73`},{{2014,6,24},41.49`},{{2014,6,25},41.77`},{{2014,6,26},41.46`},{{2014,6,27},41.99`},{{2014,6,30},41.44`},{{2014,7,1},41.61`},{{2014,7,2},41.64`},{{2014,7,3},41.54`},{{2014,7,7},41.73`},{{2014,7,8},41.52`},{{2014,7,9},41.41`},{{2014,7,10},41.43`},{{2014,7,11},41.83`},{{2014,7,14},41.88`},{{2014,7,15},42.19`},{{2014,7,16},43.81`},{{2014,7,17},44.25`},{{2014,7,18},44.41`},{{2014,7,21},44.56`},{{2014,7,22},44.55`},{{2014,7,23},44.59`},{{2014,7,24},44.12`},{{2014,7,25},44.22`},{{2014,7,28},43.7`},{{2014,7,29},43.62`},{{2014,7,30},43.31`},{{2014,7,31},42.89`},{{2014,8,1},42.59`},{{2014,8,4},43.1`},{{2014,8,5},42.81`},{{2014,8,6},42.47`},{{2014,8,7},42.96`},{{2014,8,8},42.93`},{{2014,8,11},42.93`},{{2014,8,12},43.25`},{{2014,8,13},43.81`},{{2014,8,14},44.`},{{2014,8,15},44.51`},{{2014,8,18},44.83`},{{2014,8,19},45.33`},{{2014,8,20},44.95`},{{2014,8,21},45.22`},{{2014,8,22},45.15`},{{2014,8,25},45.17`},{{2014,8,26},45.01`},{{2014,8,27},44.87`},{{2014,8,28},44.88`},{{2014,8,29},45.43`},{{2014,9,2},45.09`},{{2014,9,3},44.96`},{{2014,9,4},45.26`},{{2014,9,5},45.91`},{{2014,9,8},46.47`},{{2014,9,9},46.76`},{{2014,9,10},46.84`},{{2014,9,11},47.`},{{2014,9,12},46.7`},{{2014,9,15},46.24`},{{2014,9,16},46.76`},{{2014,9,17},46.52`},{{2014,9,18},46.68`},{{2014,9,19},47.52`},{{2014,9,22},47.06`},{{2014,9,23},46.56`},{{2014,9,24},47.08`},{{2014,9,25},46.04`},{{2014,9,26},46.41`},{{2014,9,29},46.44`},{{2014,9,30},46.36`},{{2014,10,1},45.9`},{{2014,10,2},45.76`},{{2014,10,3},46.09`},{{2014,10,6},46.09`},{{2014,10,7},45.53`},{{2014,10,8},46.78`},{{2014,10,9},45.85`},{{2014,10,10},44.03`},{{2014,10,13},43.65`},{{2014,10,14},43.73`},{{2014,10,15},43.22`},{{2014,10,16},42.74`},{{2014,10,17},43.63`},{{2014,10,20},44.08`},{{2014,10,21},44.88`}};

Default Appearances

CompareTheme[Plot[{Sin[x],Cos[x],Sin[x+1],Cos[x+1]},{x,0,10}],None]

CompareTheme[Table[ListPlot[SeedRandom[1];RandomVariate[NormalDistribution[],{20^i,2}]],{i,3}]]

CompareTheme[{ContourPlot[Sin[x]Cos[y],{x,0,10},{y,0,10}],BarChart[Partition[Prime[Range[12]],4]],ParametricPlot[{{2Cos[t],2Sin[t]},{2Cos[t],Sin[t]},{Cos[t],2Sin[t]},{Cos[t],Sin[t]}},{t,0,2Pi}]}]

CompareTheme[ParametricPlot3D[{{4+(3+Cos[v]) Sin[u],4+(3+Cos[v]) Cos[u],4+Sin[v]},{8+(3+Cos[v]) Cos[u],3+Sin[v],4+(3+Cos[v]) Sin[u]}},{u,0,2Pi},{v,0,2Pi}]]

data=RandomVariate[NormalDistribution[0,1],{10000,2}];
Style[Row[{Histogram3D[data],Histogram3D[data,60]}],ImageSizeMultipliers->{1, 1}]

Base Themes

({{, , }, {, , }})

({{(Legended[, (LineLegend[(BesselJ[1, "x"]), (BesselJ[2, "x"]), (BesselJ[3, "x"]), (BesselJ[4, "x"])])]), , }, {(Legended[, (BarLegend)]), (Legended[, (SwatchLegend[sin("x" "y")])]), }})

({{, , }, {(Legended[, (BarLegend)]), , }})

({{, , }, {, , }})

({{, , }, {, , }})

({{, , }, {, , }})

({{, , }, {(Legended[, (BarLegend)]), , }})

({{, , }, {, , }})

Plot3D[Sin[x]Cos[y],{x,0,5},{y,0,5},PlotTheme]

BarChart[Range[5],PlotTheme]

Block[{$PlotTheme="Monochrome"},
{Plot3D[Sin[x y],{x,0,3},{y,0,3}],Plot3D[Sin[x y],{x,0,3},{y,0,3},PlotStyle->White]}]

Feature Themes

Grid[Partition[ListPlot[{},PlotTheme->#,PlotLabel->#,ImageSize->Small]&/@{"NoAxes","Axes","Grid","SingleAxis","FullAxes","Frame","HeightGrid","FullAxesGrid","FrameGrid"},3]]

Grid[Partition[ListPlot[{},PlotTheme->#,PlotLabel->#,ImageSize->Small]&/@{"SerifLabels","SansLabels"},2]]

ListLinePlot[Accumulate[RandomReal[{-1,1},50]],PlotTheme->"Icon",PlotLabel->"Icon"]

ListLinePlot[Accumulate[RandomReal[{-1,1},50]],PlotTheme->"Wide",PlotLabel->"Wide"]

Row[{"This is some text with a plot in it: ",
ListLinePlot[Accumulate[RandomReal[{-1,1},50]],PlotTheme->"Sparkline"]}]

Block[{name={"Classic",(*"Default",*)"Business","Marketing","Scientific","Web"},
colorData={1,(*97,*)106,109,108,112}},
Grid[Partition[Table[Labeled[ArrayPlot[{ColorData[colorData[[n]],"ColorList"]},PlotTheme->"Bare"],{colorData[[n]],name[[n]]}],{n,Length@name}],3,3,1,{}]]
]

Block[{name={"BoldColor","CoolColor","DarkColor","NeonColor","PastelColor","RoyalColor","VibrantColor","WarmColor"},
colorData={106,107,108,109,110,111,112,113}},
Grid[Partition[Table[Labeled[ArrayPlot[{ColorData[colorData[[n]],"ColorList"]},PlotTheme->"Bare"],{colorData[[n]],name[[n]]}],{n,Length@name}],3,3,1,{}]]
]

DateListPlot[{apple,msft},PlotTheme->{"Web","Wide"}]

DateListPlot[{apple,msft},PlotTheme->{"Web","Frame"}]

DateListPlot[{apple,msft},PlotTheme->{"Frame","Web"}]

Nuanced Visualizations

Grid[{{
Plot[Sin[x],{x,0,2Pi}],
Plot[Sin[x],{x,0,2Pi},PlotTheme->"SimpleTicks"]
}}]

Plot3D[2Sin[x y],{x,-3,3},{y,-2,2},PlotTheme->"Frame"]

Plot3D[2Sin[x y],{x,-3,3},{y,-2,2},MeshStyle->GrayLevel[1,0.5]]

{DateListPlot[apple,GridLines->Automatic],DateListPlot[apple,GridLines->Automatic,GridLinesStyle->Directive[CapForm["Butt"],AbsoluteDashing[{1,2}],Gray,Opacity[0.5]]]}

BarChart[{Reverse@Range[5]},ImageMargins->20,PlotTheme->{"BackgroundColor",Hue[0.67,0,0.3]}]

Custom Themes

Themes`AddThemeRules["WTC2014",_,Frame->True,ImageSize->{{800},{400}}]

Themes`AddThemeRules["WTC2014","BarChart",ChartStyle->,ImageSize->{{800},{400}}]

Plot[Sin[x],{x,0,10},PlotTheme->"WTC2014"]

BarChart[{1,1,2,3,5,8,13},PlotTheme->"WTC2014"]

Themes`ThemeRules["WTC2014"]

Themes`ExportTheme["~/wtc.theme","WTC2014"]

Themes`ClearThemeRules["WTC2014"]

Themes`ThemeRules["WTC2014"]

Quit

Themes`ImportTheme["~/wtc.theme"]

BarChart[Range[5],PlotTheme->"WTC2014"]