Figuretheme
Jump to navigation
Jump to search
Purpose
Resets a figure background and axes to a specified color.
Synopsis
- settings = figuretheme(fig,color)
- settings = figuretheme(fig)
Description
Automatically adjusts figure and axes colors, including objects on the axes, to have a particular background color scheme. Objects on the axes which might conflict with the background color scheme are automatically adjusted to a non-conflicting color.
Inputs
- fig = figure to modify (if empty or omitted, the current figure is used).
- color = color to set figure and axes background to. Can either be a three-element RGB code: [red green blue] or can be one of the following strings:
- 'w' : white background (both figure and axes)
- 'k' : black background (both figure and axes)
- 'd' : default color scheme (usually gray figure, white axes)
- 'g' : gray figure, white axes (often the default, but useful if the default is something else).
- 'next' : toggles bewteen 'w' -> 'k' -> 'd'
- If color is omitted or empty, the last used colorscheme will be re-applied to the figure (if not the default).
Outputs
- settings = a structure array containing the colors used for the figure and axes in the fields 'color' and 'axescolor', respectively.