next up previous contents index
Next: Hard Copy and File Up: Device Control Previous: Window Control   Contents   Index


Changing the Window Style Interactively

Calling Sequences
...

 
style = get_style()
set_style(style)

Description
The function get_style() returns a set of nested dictionaries that contain the style information that is currently used by the active window. The dictionary has the following structure:
style
['landscape']: Set orientation to portrait (0) or landscape (1)
['legend']:
['x']: NDC horizontal location of the legend box
['y']: NDC vertical location of the legend box
['dx']: NDC horizontal offset to 2nd column
['dy']: NDC vertical offset to 2nd column
['nchars']: Maximum number of characters on a line
['nlines']: Maximum number of lines
['nwrap']: Maximum number of lines to wrap long legends
['textStyle']:
['height']: Character height in NDC, default 0.0156 (12pt)
['font']: Text font, specified by an integer:
Courier: 0
Times: 4
Helvetica: 8
Symbol: 12
New Century: 16
(add 1 for bold, 2 for italic)
['color']: Text color
['orient']: Text path
('right', 'up', 'left', 'down')
['alignH']: Horizontal alignment
('normal', 'left', 'center', 'right')
['alignV']: Vertical alignment
('normal', 'top', 'cap', 'half',
'base', 'bottom')
['contourlegend']:
['x']: NDC horizontal location of the contour legend box
['y']: NDC vertical location of the contour legend box
['dx']: NDC horizontal offset to 2nd column in the contour legend box
['dy']: NDC vertical offset to 2nd column in the contour legend box
['nchars']: Maximum number of characters on a line
['nlines']: Maximum number of lines
['nwrap']: Maximum number of lines to wrap long legends
['textStyle']:
['height']: Character height in NDC, default 0.0156 (12pt)
['font']: Text font, specified by an integer:
Courier: 0
Times: 4
Helvetica: 8
Symbol: 12
New Century: 16
(add 1 for bold, 2 for italic)
['color']: Text color
['orient']: Text path
('right', 'up', 'left', 'down')
['alignH']: Horizontal alignment
('normal', 'left', 'center', 'right')
['alignV']: Vertical alignment
('normal', 'top', 'cap', 'half',
'base', 'bottom')
['systems']: returns a list of systems, each of which is a dictionary with the keys:
['legend']: default legend
['viewport']: viewport size, array([left, right, bottom, top])
['ticks']:
['frame']: Switch the frame on (1) or off (0)
['frameStyle']:
['color']: Color of the frame
['width']: Line width of the frame
['type']: Line style of the frame:
('none', 'solid', 'dash', 'dot',
'dashdot', 'dashdotdot')
['horizontal']:
['nDigits']: Number of digits for the tick labels
['nMinor']: Number of minor tick marks
['nMajor']: Number of major tick marks
['logAdjMinor']: Adjustment factor for nMinor for a log scale
['logAdjMajor']: Adjustment factor for nMajor for a log scale
['flags']: Integer, given by the sum of
1: There are ticks at the bottom edge of the viewport
2: There are ticks at the upper edge of the viewport
4: Ticks are centered on the axis
8: Ticks are go inward from the axis
16: Ticks are go outward from the axis
32: There are labels at the bottom edge
64: There are labels at the upper edge
128: There is a full grid
256: There is a single grid line at the origin
512: Alternative tick generator is used
1024: Alternative label generator is used
['xOver']: Horizontal position of the overflow label
['yOver']: Vertical position of the overflow label
['labelOff']: Offset from the edge of the viewport to the labels
['tickOff']: Offset from the edge of the viewport to the ticks
['tickLen']: Tick lengths in NDC
['tickStyle']:
['color']: Color of the ticks
['width']: Line width of the ticks
['type']: Line type of the ticks
('none', 'solid', 'dash', 'dot',
'dashdot', 'dashdotdot')
['gridLevel']: Level of the ticks at which the grid is drawn
['gridStyle']:
['color']: Color of the grid
['width']: Line width of the grid
['type']: Line type of the grid
('none', 'solid', 'dash', 'dot',
'dashdot', 'dashdotdot')
['vertical']:
['nDigits']: Number of digits for the tick labels
['nMinor']: Number of minor tick marks
['nMajor']: Number of major tick marks
['logAdjMinor']: Adjustment factor for nMinor for a log scale
['logAdjMajor']: Adjustment factor for nMajor for a log scale
['flags']: Integer, given by the sum of
1: There are ticks at the left edge of the viewport
2: There are ticks at the right edge of the viewport
4: Ticks are centered on the axis
8: Ticks are go inward from the axis
16: Ticks are go outward from the axis
32: There are labels at the left edge
64: There are labels at the right edge
128: There is a full grid
256: There is a single grid line at the origin
512: Alternative tick generator is used
1024: Alternative label generator is used
['xOver']: Horizontal position of the overflow label
['yOver']: Vertical position of the overflow label
['labelOff']: Offset from the edge of the viewport to the labels
['tickOff']: Offset from the edge of the viewport to the ticks
['tickLen']: Tick lengths in NDC
['tickStyle']:
['color']: Color of the ticks
['width']: Line width of the ticks
['type']: Line type of the ticks
('none', 'solid', 'dash', 'dot',
'dashdot', 'dashdotdot')
['gridLevel']: Level of the ticks at which the grid is drawn
['gridStyle']:
['color']: Color of the grid
['width']: Line width of the grid
['type']: Line type of the grid
('none', 'solid', 'dash', 'dot',
'dashdot', 'dashdotdot')
By changing the values of the appropriate keys in the dictionary style, and calling the routine set_style(style), the style of the current window can be changed interactively. This is used in the plh routine (see page [*]) to switch off the tick marks and labels below the horizontal axis in a histogram.


next up previous contents index
Next: Hard Copy and File Up: Device Control Previous: Window Control   Contents   Index
Michiel Jan Laurens de Hoon 2003-04-19