[Go to Previous] [Go to Next]


Modify the Display Object

annotate - Writes text to a panel

Usage: panel[0].annotate(keywords)
Keywords - required:
text= annotation string. This string can contain HTML tags such as paragraph <p>, line break <br>, emphasize/italicize <em>, and bold <b>
lat=, lon= center text string at specified latitude and longitude (must be used together) -or-
line=, element= center text string at specified panel line and element (must be used together)
Keywords - optional:
font= name of font; default is system dependent, this uses the default defined in User Preferences
size= size of font; default = size of font defined in user preferences
style= style of font; default = style of font defined in user preferences
'BOLD'
'ITALIC'
'NONE'
color= sets the color of the text. There are two ways this can be set:
'color name'; default = 'red'
-or-
[R,G,B] fractional scaling factor for each red, green and blue value (0 to 255). For example, [255,0,0]
alignment= sets the location of the text with respect to the latitude/longitude or line/element combination entered. The format is alignment=(horizontal,vertical). For horizontal, values of "left", "right", and "center" can be used. For vertical, values of "top", "bottom" and "center" can be used. The default is alignment=("center","center") which means the text will be centered at the location of the latitude/longitude or line/element values.
bgColor= sets the background color of the text. default=None
There are two ways this can be set:
'color name'. For example, 'green' -or-
[R,G,B] fractional scaling factor for each red, green and blue value (0 to 255). For example, [0,255,0]
Example:
panel[0].annotate('EQUATOR',size=20, font='SansSerif.bold', lat=0, lon=-90, color='Green',alignment=("left","top"))

annotateAtStation - Writes text to a panel

Usage: panel[0].annotateAtStation(keywords)
Keywords - required:
text= annotation string. This string can contain HTML tags such as paragraph <p>, line break <br>, emphasize/italicize <em>, and bold <b>
station= 3 or 4 letter station identifier used to set the location of the annotated text
Keywords - optional:
type= specifies the station type. This is needed if the station specified has multiple types at different geographical locations. The valid options are:
'A' - Surface Airways Observations (SAO)
'C' - CMAN Coastal Marine
'E' - NAM MOS (formerly called ETA MOS)
'F' - NGM MOS (formerly called FOUS14)
'G' - GFS MOS
'M' - METAR
'N' - NEXRAD Doppler Radar
'R' - RAOB
'S' - VOR Site
'T' - Terminal Aerodome Forecast (TAF)
'V' - Weather Service Forecast Office (WSFO)
font= name of font; default is system dependent, this uses the default defined in User Preferences
size= size of font; default = size of font defined in user preferences
style= style of font; default = style of font defined in user preferences
'BOLD'
'ITALIC'
'NONE'
color= sets the color of the text. There are two ways this can be set:
'color name'; default = 'red'
-or-
[R,G,B] fractional scaling factor for each red, green and blue value (0 to 255). For example, [255,0,0]
alignment= sets the location of the text with respect to the latitude/longitude or line/element combination entered. The format is alignment=(horizontal,vertical). For horizontal, values of "left", "right", and "center" can be used. For vertical, values of "top", "bottom" and "center" can be used. The default is alignment=("center","center") which means the text will be centered at the location of the latitude/longitude or line/element values.
bgColor= sets the background color of the text. default=None
There are two ways this can be set:
'color name'. For example, 'green' -or-
[R,G,B] fractional scaling factor for each red, green and blue value (0 to 255). For example, [0,255,0]
Example:
panel[0].annotateAtStation('Doylestown',size=20, font='Source Code Pro Medium', station='KDYL', color='Green',alignment=("left","top"))

getMapLayer - Obtains a reference to the map layer in the display

Usage: panel[0].getMapLayer()
Example:
mapLayer = panel[0].getMapLayer()
mapLayer.setVerticalPosition(1)

setCenter - Centers the display on a specified latitude/longitude and sets a scaling factor

Usage: panel[0].setCenter(keywords)
Keywords - required:
lat= centers the display at the specified latitude (no default, required parameter)
lon= centers the display at the specified longitude (no default, required parameter)
Keywords - optional:
scale= scale factor for map; default = current scale factor
Remarks:
Scale factors between 0 and 1 zoom out centered on the specified latitude/longitude and scale factors greater than 1 zoom in.
Example:
panel[0].setCenter(45, -75, scale=20)

setCenterAtStation - Centers the display on a specified station and sets a scaling factor

Usage: panel[0].setCenter(keywords)
Keywords - required:
station= 3 or 4 letter station identifier used to set the location of the annotated text
Keywords - optional:
type= specifies the station type. This is needed if the station specified has multiple types at different geographical locations. The valid options are:
'A' - Surface Airways Observations (SAO)
'C' - CMAN Coastal Marine
'E' - NAM MOS (formerly called ETA MOS)
'F' - NGM MOS (formerly called FOUS14)
'G' - GFS MOS
'M' - METAR
'N' - NEXRAD Doppler Radar
'R' - RAOB
'S' - VOR Site
'T' - Terminal Aerodome Forecast (TAF)
'V' - Weather Service Forecast Office (WSFO)
scale= scale factor for map; default = current scale factor
Remarks:
Scale factors between 0 and 1 zoom out centered on the specified latitude/longitude and scale factors greater than 1 zoom in.
Example:
panel[0].setCenterAtStation(station='KDYL',type='M', scale=20)

setMapLayerVisibility - Sets the visibility of the entire map layer in the display

Usage: panel[0].setMapLayerVisibility(keyword)
Keyword - required:
visibility= sets the visibility of the map layer in the display
True - displays the map
False - does not display the map
Example:
panel[0].setMapLayerVisibility(visibility=True)

setMapVisibilityByDescription - Sets the visibility of individual maps in the display

Usage: panel[0].setMapVisibilityByDescription(keywords)
Keywords - required:
description= the map to be added or removed from the display. The description matches the names of the maps in the Layer Controls.
visibility= sets the visibility of the map defined in the description keyword
True - displays the map
False - does not display the map
Examples:
panel[0].setMapVisibilityByDescription(description='World Coastlines', visibility=False)
panel[0].setMapVisibilityByDescription(description='U.S. County Outlines', visibility=True)

setProjection - Sets the projection of a panel

Usage: panel[0].setProjection(keywords)
Keywords - required:
projection= string specifying the projection; e.g., 'US>Southeastern U.S.' or the name of the layer returned from createLayer, which uses the default projection of that data. Alternatively, a layer object can be passed through this keyword. For example, if a layer was defined as myLayer when running createLayer, passing 'myLayer' through the projection keyword would set the projection to the native projection of the myLayer layer.
Example:
panel[0].setProjection(projection='US>States>N-Z>Pennsylvania')

setProjectionFromData - Enables or disables auto-set projection of a panel

Usage: panel[0].setProjectionFromData(False)
Example:
panel[0].setProjectionFromData(False)
Remarks:
By default, when a layer is displayed in a panel, the projection will be remapped to the native projection of the data. The user can disable this by passing "False" through setProjectionFromData. When this is done, the projection will not update when data is displayed. This is the same as disabling Projections -> Auto-set Projection in the Main Display window. The default for this command is "True".

setViewpoint - Sets the viewpoint of a panel

Usage: panel[0].setViewpoint(keywords)
Keywords - required:
viewpointName= string specifying the viewpoint; e.g., 'Viewpoint1'. This works in conjunction with the Projections->Viewpoints menu item in the Main Display window.
Example:
panel[0].setViewpoint(viewpointName='Viewpoint1')

setWireframe - Turns wire frame box on or off

Usage: panel[0].setWireframe(keywords)
Keywords - required:
visible= sets the visibility of the wireframe box
True - displays the wireframe box
False - does not display the wireframe box
Examples:
panel[0].setWireframe(False)
panel[0].setWireframe(True)

[Go to Previous] [Go to Next]