0

The default style selection of ListLinePlot makes it hard to tell things apart, is there some easy way to apply a better (automatically chosen) set of distinct styles? IE, things like varying thickesses, dash style, etc

Here's what I end up with default styles

enter image description here

Yaroslav Bulatov
  • 7,793
  • 1
  • 19
  • 44

1 Answers1

1

I found what I needed in mrwizard's answer here -- Specifying non-conflicting PlotTheme options

The trick was to specify another theme just for dashing, and combine it with default Theme:

System`PlotThemeDump`resolvePlotTheme["monoDash", 
  "Plot" | "ListPlot" | "ListLinePlot"] := 
 Themes`SetWeight[{"DefaultDashing" -> {AbsoluteDashing[{}], 
     AbsoluteDashing[{}], AbsoluteDashing[{}], 
     AbsoluteDashing[{5, 5}], AbsoluteDashing[{5, 5}], 
     AbsoluteDashing[{5, 5}], AbsoluteDashing[{}], 
     AbsoluteDashing[{}]}}, System`PlotThemeDump`$ComponentWeight]
System`PlotThemeDump`resolvePlotTheme["monoThick", 
   "Plot" | "ListPlot" | "ListLinePlot"] :=

  Themes`SetWeight[{"DefaultThickness" -> {AbsoluteThickness[3.0], 
      AbsoluteThickness[3.0], AbsoluteThickness[3.0], 
      AbsoluteThickness[1.6], AbsoluteThickness[1.6], 
      AbsoluteThickness[1.6], AbsoluteThickness[1.6], 
      AbsoluteThickness[1.6], AbsoluteThickness[1.6]}}, 
   System`PlotThemeDump`$ComponentWeight];    


seqLen = 100;
nSeq = 9;
seq := Accumulate[
   Table[RandomVariate[NormalDistribution[]], {seqLen}]];
seqs = Table[seq, {nSeq}];
ListLinePlot[seqs, PlotLegends -> {1, 2, 3, 4, 5, 6, 7, 8, 9}, 
 PlotTheme -> {"monoDash", "monoThick"}]

enter image description here

Yaroslav Bulatov
  • 7,793
  • 1
  • 19
  • 44
  • What does SetWeight function from `Themes`` context does? Is there some reference where one can read more about it? – ercegovac Sep 26 '17 at 12:41