11

I'm sure this must have been asked before but I am unable to find anything here on SE or on Google in general.

I simply want to know what the default color and thickness are for a Frame on a Plot and for the Axes.

Looking in the help seems to send me down a rabbit hole of,

The default style of axes is specified by the option DefaultAxesStyle.

For Graphics, the default setting is DefaultAxesStyle->"GraphicsAxes"

And although I can use GraphicsAxes as an option value, eg FrameStyle->"GraphicsAxes" I still can't discover what the actual shade of gray and line thickness that is. Are these deliberately hidden somewhere, or I am not looking hard enough?

Many thanks,

Quantum_Oli
  • 7,964
  • 2
  • 21
  • 43

2 Answers2

15

Hunting through the stylesheets is effective, but does not necessarily give you the current value being used if it has been modified. Instead, use

CurrentValue[{StyleDefinitions , "GraphicsAxes"}]
(* {Arrowheads -> {}, LineColor -> GrayLevel[0.4], Thickness -> Absolute[0.2]} *)

CurrentValue[{StyleDefinitions , "GraphicsFrame"}]
(* {LineColor -> GrayLevel[0.4], Thickness -> Absolute[0.5]} *)
rcollyer
  • 33,976
  • 7
  • 92
  • 191
  • Nice code! I just tried to help myself and applied CurrentValue[{StyleDefinitions, "FrameTicksStyle"}] to get the values from a ListDensityPlotit brings {} What am I doing wrong? – Kay Apr 11 '16 at 13:30
  • @Kay if you notice, the query is not "AxesStyle" or "FrameStyle", but "GraphicsAxes" and "GraphicsFrame". Extrapolating from that, you're looking for "GraphicsFrameTicks", not "FrameTicksStyle", and you get {ScriptLevel -> 1, LineColor -> GrayLevel[0.4]}, in 10.4. – rcollyer Apr 11 '16 at 13:50
  • right! thank you! – Kay Apr 11 '16 at 14:28
9

The styles "GraphicsAxes" and "GraphicsFrame" are defined in the stylesheet "Core.nb".

  • To access to this file use the menu : format/edit stylesheet
  • Then in the notebook that appears click on Default.nb
  • In the new notebook that appears click on Core.nb
  • Then the notebook core.nb appears.
  • Go to section :"style for Mathematica System-specific Elements" and open it
  • Go to the cell "default Box style" and open it
  • Go to "Local definition for style Graphics"
  • Select the cell "GraphicsAxes"
  • Do Control-Shift-E (on Windows, otherwise you can use the menu : Cell/ShowExpression)
  • Then you see :

    Cell[StyleData["GraphicsAxes"], Arrowheads->{}, LineColor->GrayLevel[0.4], Thickness->Absolute[0.2]]

This is the internal structure of the cell. One can see the settings for the style "GraphicsAxes"

andre314
  • 18,474
  • 1
  • 36
  • 69