Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/valid_type.html
Jump to: Description · Example · Bugs · See Also


AHELP for CIAO 4.11 ChIPS v1

valid_type

Context: utilities

Synopsis

Check that a value is a valid input for a ChIPS attribute (e.g. color or line style).

Syntax

valid_axisstyle_type(value)
valid_baddatamode_type(value)
valid_color(value)
valid_colormap_type(value)
valid_contour_type(value)
valid_coord_sys_type(value)
valid_cornerstyle_type(value)
valid_errstyle_type(value)
valid_fill_type(value)
valid_font_type(value)
valid_fontstyle_type(value)
valid_interpolation_type(value)
valid_line_extension_type(value)
valid_line_type(value)
valid_object_type(value)
valid_printfile_type(value)
valid_rgba_type(value)
valid_shuffle_type(value)
valid_symbol_type(value)
valid_tickmode_type(value)
valid_tickstyle_type(value)
valid_units_type(value)

Description

The function arguments.

Argument Description
value The value to check. It should be an integer or ChIPS enumeration, such as chips_solid or chips_dot, for all routines except valid_color(), which accepts a string. See "ahelp chipsopt" for more information on these values.

These routines return True if the input argument (value) is a valid value for the ChIPS attribute, False otherwise. This command is part of the advanced ChIPS module; refer to "ahelp chips" for information. To load the module:

from pychips.advanced import *

How do the ChIPS attributes/arguments and routines match up?

Routine Description Example value
valid_axisstyle_type The style attribute of axes. chips_open
valid_baddatamode_type The baddata attribute of curves. chips_omit
valid_color Any color attribute. "red" or "ff231e"
valid_colormap_type The colormap attribute of images. chips_rainbow
valid_contour_type The algorithm attribute of contours. chips_standard
valid_coord_sys_type Any coord_sys or coordsys attribute. DATA or FRAME_NORM
valid_cornerstyle_type The corner.style attribute of plots. chips_miter
valid_errstyle_type The err.style attribute of curves and histograms. chips_cap
valid_fill_type The fill.style attribute of histograms and regions. chips_solid
valid_font_type The font attribute of labels and the various label components of axes. chips_helvetica
valid_fontstyle_type The fontstyle attribute of labels and the various label components of axes. chips_bolditalic
valid_interpolation_type The interpolation attribute of images. chips_bilinear
valid_line_extension_type The extend attribute of lines. chips_extend_both
valid_line_type The style attribute of lines or the line components of objects such as a curve. chips_dot
valid_object_type The ChIPS object type, as used in commands such as shuffle_forward, set_attribute, or set_cascading_property. chips_histogram
valid_printfile_type The colorscheme attribute of print_window. chips_rgb
valid_rgba_type Does the colormap contain a valid true color channel? chips_red
valid_shuffle_type The direction argument for the shuffle_<object> routines. chips_front
valid_symbol_type The style attribute of symbols or the symbol components of curves and histograms. chips_circle
valid_tickmode_type The mode attribute of the majortick and minortick components of axes. chips_nice
valid_tickstyle_type The style attribute of the majortick and minortick components of axes. chips_centered
valid_units_type The units attribute for screen and page units attributes of add_window and print_window. chips_cm

Example

chips> print(valid_color("beige"))
True

Checks whether the string 'beige' is a valid color for objects.


Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

concepts
setget
utilities
set_current