2
$\begingroup$

For the most part, the "Monochrome" theme is useful. However the default inclusion of plot markers in a ListLinePlot was imo a horrible mistake (a design bug), both inconsistent with other styles and most often unwanted. I'm tired of turning markers off over and over (note that SetOptions is overridden by the theme). So I would like to very simply (i.e., in a couple lines) define a new theme that is identical except for the new setting PlotMarkers->None for ListLinePlot. I started designing a new style with Themes`AddThemeRules but it proved to be a rabbit hole. Suggestions?

$\endgroup$
3
$\begingroup$

As explained nicely by @MrWizard in his answers here and here, you'll want to use System`PlotThemeDump`resolvePlotTheme for anything non-trivial when working with themes. Here, we can use this to easily create a new theme that inherits from "Monochrome", except that it changes one setting for ListLinePlot:

System`PlotThemeDump`resolvePlotTheme["MonochromeFixed", p_] :=
 System`PlotThemeDump`resolvePlotTheme["Monochrome", p]
(* special case for ListLinePlot *)
System`PlotThemeDump`resolvePlotTheme["MonochromeFixed", p : "ListLinePlot"] :=
 System`PlotThemeDump`resolvePlotTheme["Monochrome", p] /. 
   (PlotMarkers -> _) :> (PlotMarkers -> None)

No more PlotMarkers by default:

ListLinePlot[RandomReal[{0, 1}, {3, 3}], PlotTheme -> "MonochromeFixed"]

enter image description here

Other plots are just as with "Monochrome":

BarChart[RandomReal[{0, 1}, {3, 3}], PlotTheme -> "MonochromeFixed"]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.