I am reporting inconsistent behavior of the "Monochrome" theme through this post when using a GrayLevel[] background. I am using version 12.2.0 Win7-x64.

Using a GrayLevel[] background for the Plot, the axes revert in color (turn lighter and remain visible) for other themes as the background gets darker but not for the "Monochrome". In other words it literally goes mono-chrome. The GridLines disappear as well and do not invert to a lighter color for all themes (not sure if there is an option to do so).

 Plot[{Sin[2 x], Sin[x]}
  , {x, 0, 2 \[Pi]}
  , PlotTheme -> pt
  , Background -> GrayLevel[op1]
  , GridLines -> Automatic
  , GridLinesStyle -> Directive[Thin, Black, Dotted]
  , PlotRange -> {{-0.1, 2 \[Pi]}, {-1.1, 1.1}}
  , Axes -> False
  , Frame -> Automatic
  , FrameTicks -> Automatic
 {{op1, 1.0, "GrayLevel"
   , Appearance -> Labeled}, 0.0, 1.0}
 , {{pt, "Scientific", "Theme"
   , Appearance -> Labeled}
  , {"Default", "Scientific",
   "Detailed", "Web", "Monochrome"}}

enter image description here


1 - Is there a workaround for inverting plot colors but keeping the grid lines.

2 - Is this behavior version dependent?

3 - There used to be a DefaultColor directive that could invert the color for all items in the plot including the grid lines. It is obsolete now; I was wondering what its repalcement is?

For experiments without using PlotTheme, there is an alternate commented out section (two lines) that you can enable instead of the currently enabled statements.


The reason I was experimenting with themes was to create:

(1) Light and Dark themes for (print and web page outputs)

(2) I wanted to create an oscilloscope like display with grid lines and controlling the glow of the traces, but I am not there yet.

  • $\begingroup$ For non-monochrome themes the FrameStyle is gray instead of black. $\endgroup$ Jan 4 at 11:42
  • $\begingroup$ A good observation ... By inconsistent, I mean not consistent with other themes being usable across the background gray level range. I should edit in the reason I was experimenting with it. Thanks for the comment. $\endgroup$
    – Syed
    Jan 4 at 15:36
  • $\begingroup$ I meant my comment as an explanation why this behaviour is consistent. I don't think that WRI's aim was to have themes that are all "usable across the background gray level range". After all, monochrome means a single color to style frames, axes, ticks, curves, labels, etc. Since it is by default black, you won't see them with a black background. You could use gray as your monochrome, but of course then you won't see anything on a gray background. $\endgroup$ Jan 4 at 16:32


Your Answer

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

Browse other questions tagged or ask your own question.