Search is not available for this dataset
identifier
stringlengths
1
155
parameters
stringlengths
2
6.09k
docstring
stringlengths
11
63.4k
docstring_summary
stringlengths
0
63.4k
function
stringlengths
29
99.8k
function_tokens
sequence
start_point
sequence
end_point
sequence
language
stringclasses
1 value
docstring_language
stringlengths
2
7
docstring_language_predictions
stringlengths
18
23
is_langid_reliable
stringclasses
2 values
ColorBar.ticktext
(self)
Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. The 'ticktext' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. The 'ticktext' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def ticktext(self): """ Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. The 'ticktext' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["ticktext"]
[ "def", "ticktext", "(", "self", ")", ":", "return", "self", "[", "\"ticktext\"", "]" ]
[ 943, 4 ]
[ 956, 31 ]
python
en
['en', 'error', 'th']
False
ColorBar.ticktextsrc
(self)
Sets the source reference on Chart Studio Cloud for ticktext . The 'ticktextsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for ticktext . The 'ticktextsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def ticktextsrc(self): """ Sets the source reference on Chart Studio Cloud for ticktext . The 'ticktextsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["ticktextsrc"]
[ "def", "ticktextsrc", "(", "self", ")", ":", "return", "self", "[", "\"ticktextsrc\"", "]" ]
[ 965, 4 ]
[ 976, 34 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickvals
(self)
Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. The 'tickvals' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. The 'tickvals' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def tickvals(self): """ Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. The 'tickvals' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["tickvals"]
[ "def", "tickvals", "(", "self", ")", ":", "return", "self", "[", "\"tickvals\"", "]" ]
[ 985, 4 ]
[ 997, 31 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickvalssrc
(self)
Sets the source reference on Chart Studio Cloud for tickvals . The 'tickvalssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for tickvals . The 'tickvalssrc' property must be specified as a string or as a plotly.grid_objs.Column object
def tickvalssrc(self): """ Sets the source reference on Chart Studio Cloud for tickvals . The 'tickvalssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["tickvalssrc"]
[ "def", "tickvalssrc", "(", "self", ")", ":", "return", "self", "[", "\"tickvalssrc\"", "]" ]
[ 1006, 4 ]
[ 1017, 34 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickwidth
(self)
Sets the tick width (in px). The 'tickwidth' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the tick width (in px). The 'tickwidth' property is a number and may be specified as: - An int or float in the interval [0, inf]
def tickwidth(self): """ Sets the tick width (in px). The 'tickwidth' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["tickwidth"]
[ "def", "tickwidth", "(", "self", ")", ":", "return", "self", "[", "\"tickwidth\"", "]" ]
[ 1026, 4 ]
[ 1037, 32 ]
python
en
['en', 'error', 'th']
False
ColorBar.title
(self)
The 'title' property is an instance of Title that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Title` - A dict of string/value properties that will be passed to the Title constructor Supported dict properties: font Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. side Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. text Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. Returns ------- plotly.graph_objs.scatter3d.line.colorbar.Title
The 'title' property is an instance of Title that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Title` - A dict of string/value properties that will be passed to the Title constructor Supported dict properties: font Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. side Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. text Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.
def title(self): """ The 'title' property is an instance of Title that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Title` - A dict of string/value properties that will be passed to the Title constructor Supported dict properties: font Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. side Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. text Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. Returns ------- plotly.graph_objs.scatter3d.line.colorbar.Title """ return self["title"]
[ "def", "title", "(", "self", ")", ":", "return", "self", "[", "\"title\"", "]" ]
[ 1046, 4 ]
[ 1076, 28 ]
python
en
['en', 'error', 'th']
False
ColorBar.titlefont
(self)
Deprecated: Please use scatter3d.line.colorbar.title.font instead. Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". size Returns -------
Deprecated: Please use scatter3d.line.colorbar.title.font instead. Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". size
def titlefont(self): """ Deprecated: Please use scatter3d.line.colorbar.title.font instead. Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". size Returns ------- """ return self["titlefont"]
[ "def", "titlefont", "(", "self", ")", ":", "return", "self", "[", "\"titlefont\"", "]" ]
[ 1085, 4 ]
[ 1125, 32 ]
python
en
['en', 'error', 'th']
False
ColorBar.titleside
(self)
Deprecated: Please use scatter3d.line.colorbar.title.side instead. Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. The 'side' property is an enumeration that may be specified as: - One of the following enumeration values: ['right', 'top', 'bottom'] Returns -------
Deprecated: Please use scatter3d.line.colorbar.title.side instead. Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. The 'side' property is an enumeration that may be specified as: - One of the following enumeration values: ['right', 'top', 'bottom']
def titleside(self): """ Deprecated: Please use scatter3d.line.colorbar.title.side instead. Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. The 'side' property is an enumeration that may be specified as: - One of the following enumeration values: ['right', 'top', 'bottom'] Returns ------- """ return self["titleside"]
[ "def", "titleside", "(", "self", ")", ":", "return", "self", "[", "\"titleside\"", "]" ]
[ 1134, 4 ]
[ 1149, 32 ]
python
en
['en', 'error', 'th']
False
ColorBar.x
(self)
Sets the x position of the color bar (in plot fraction). The 'x' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float
Sets the x position of the color bar (in plot fraction). The 'x' property is a number and may be specified as: - An int or float in the interval [-2, 3]
def x(self): """ Sets the x position of the color bar (in plot fraction). The 'x' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float """ return self["x"]
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 1158, 4 ]
[ 1169, 24 ]
python
en
['en', 'error', 'th']
False
ColorBar.xanchor
(self)
Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the color bar. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'center', 'right'] Returns ------- Any
Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the color bar. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'center', 'right']
def xanchor(self): """ Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the color bar. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'center', 'right'] Returns ------- Any """ return self["xanchor"]
[ "def", "xanchor", "(", "self", ")", ":", "return", "self", "[", "\"xanchor\"", "]" ]
[ 1178, 4 ]
[ 1192, 30 ]
python
en
['en', 'error', 'th']
False
ColorBar.xpad
(self)
Sets the amount of padding (in px) along the x direction. The 'xpad' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the amount of padding (in px) along the x direction. The 'xpad' property is a number and may be specified as: - An int or float in the interval [0, inf]
def xpad(self): """ Sets the amount of padding (in px) along the x direction. The 'xpad' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["xpad"]
[ "def", "xpad", "(", "self", ")", ":", "return", "self", "[", "\"xpad\"", "]" ]
[ 1201, 4 ]
[ 1212, 27 ]
python
en
['en', 'error', 'th']
False
ColorBar.y
(self)
Sets the y position of the color bar (in plot fraction). The 'y' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float
Sets the y position of the color bar (in plot fraction). The 'y' property is a number and may be specified as: - An int or float in the interval [-2, 3]
def y(self): """ Sets the y position of the color bar (in plot fraction). The 'y' property is a number and may be specified as: - An int or float in the interval [-2, 3] Returns ------- int|float """ return self["y"]
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 1221, 4 ]
[ 1232, 24 ]
python
en
['en', 'error', 'th']
False
ColorBar.yanchor
(self)
Sets this color bar's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the color bar. The 'yanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['top', 'middle', 'bottom'] Returns ------- Any
Sets this color bar's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the color bar. The 'yanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['top', 'middle', 'bottom']
def yanchor(self): """ Sets this color bar's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the color bar. The 'yanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['top', 'middle', 'bottom'] Returns ------- Any """ return self["yanchor"]
[ "def", "yanchor", "(", "self", ")", ":", "return", "self", "[", "\"yanchor\"", "]" ]
[ 1241, 4 ]
[ 1255, 30 ]
python
en
['en', 'error', 'th']
False
ColorBar.ypad
(self)
Sets the amount of padding (in px) along the y direction. The 'ypad' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the amount of padding (in px) along the y direction. The 'ypad' property is a number and may be specified as: - An int or float in the interval [0, inf]
def ypad(self): """ Sets the amount of padding (in px) along the y direction. The 'ypad' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["ypad"]
[ "def", "ypad", "(", "self", ")", ":", "return", "self", "[", "\"ypad\"", "]" ]
[ 1264, 4 ]
[ 1275, 27 ]
python
en
['en', 'error', 'th']
False
ColorBar.__init__
( self, arg=None, bgcolor=None, bordercolor=None, borderwidth=None, dtick=None, exponentformat=None, len=None, lenmode=None, nticks=None, outlinecolor=None, outlinewidth=None, separatethousands=None, showexponent=None, showticklabels=None, showtickprefix=None, showticksuffix=None, thickness=None, thicknessmode=None, tick0=None, tickangle=None, tickcolor=None, tickfont=None, tickformat=None, tickformatstops=None, tickformatstopdefaults=None, ticklen=None, tickmode=None, tickprefix=None, ticks=None, ticksuffix=None, ticktext=None, ticktextsrc=None, tickvals=None, tickvalssrc=None, tickwidth=None, title=None, titlefont=None, titleside=None, x=None, xanchor=None, xpad=None, y=None, yanchor=None, ypad=None, **kwargs )
Construct a new ColorBar object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar` bgcolor Sets the color of padded area. bordercolor Sets the axis line color. borderwidth Sets the width (in px) or the border enclosing this color bar. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. len Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends. lenmode Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot "fraction" or in *pixels. Use `len` to set the value. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". outlinecolor Sets the axis line color. outlinewidth Sets the width (in px) of the axis line. separatethousands If "true", even 4-digit integers are separated showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. thickness Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels. thicknessmode Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot "fraction" or in "pixels". Use `thickness` to set the value. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the color bar's tick label font tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api- reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops A tuple of :class:`plotly.graph_objects.scatter3d.line. colorbar.Tickformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.data.scatte r3d.line.colorbar.tickformatstopdefaults), sets the default property values to use for elements of scatter3d.line.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for ticktext . tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for tickvals . tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.scatter3d.line.colorbar.Ti tle` instance or dict with compatible properties titlefont Deprecated: Please use scatter3d.line.colorbar.title.font instead. Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. titleside Deprecated: Please use scatter3d.line.colorbar.title.side instead. Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. x Sets the x position of the color bar (in plot fraction). xanchor Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the color bar. xpad Sets the amount of padding (in px) along the x direction. y Sets the y position of the color bar (in plot fraction). yanchor Sets this color bar's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the color bar. ypad Sets the amount of padding (in px) along the y direction. Returns ------- ColorBar
Construct a new ColorBar object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar` bgcolor Sets the color of padded area. bordercolor Sets the axis line color. borderwidth Sets the width (in px) or the border enclosing this color bar. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. len Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends. lenmode Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot "fraction" or in *pixels. Use `len` to set the value. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". outlinecolor Sets the axis line color. outlinewidth Sets the width (in px) of the axis line. separatethousands If "true", even 4-digit integers are separated showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. thickness Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels. thicknessmode Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot "fraction" or in "pixels". Use `thickness` to set the value. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the color bar's tick label font tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api- reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops A tuple of :class:`plotly.graph_objects.scatter3d.line. colorbar.Tickformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.data.scatte r3d.line.colorbar.tickformatstopdefaults), sets the default property values to use for elements of scatter3d.line.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for ticktext . tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for tickvals . tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.scatter3d.line.colorbar.Ti tle` instance or dict with compatible properties titlefont Deprecated: Please use scatter3d.line.colorbar.title.font instead. Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. titleside Deprecated: Please use scatter3d.line.colorbar.title.side instead. Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. x Sets the x position of the color bar (in plot fraction). xanchor Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the color bar. xpad Sets the amount of padding (in px) along the x direction. y Sets the y position of the color bar (in plot fraction). yanchor Sets this color bar's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the color bar. ypad Sets the amount of padding (in px) along the y direction.
def __init__( self, arg=None, bgcolor=None, bordercolor=None, borderwidth=None, dtick=None, exponentformat=None, len=None, lenmode=None, nticks=None, outlinecolor=None, outlinewidth=None, separatethousands=None, showexponent=None, showticklabels=None, showtickprefix=None, showticksuffix=None, thickness=None, thicknessmode=None, tick0=None, tickangle=None, tickcolor=None, tickfont=None, tickformat=None, tickformatstops=None, tickformatstopdefaults=None, ticklen=None, tickmode=None, tickprefix=None, ticks=None, ticksuffix=None, ticktext=None, ticktextsrc=None, tickvals=None, tickvalssrc=None, tickwidth=None, title=None, titlefont=None, titleside=None, x=None, xanchor=None, xpad=None, y=None, yanchor=None, ypad=None, **kwargs ): """ Construct a new ColorBar object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar` bgcolor Sets the color of padded area. bordercolor Sets the axis line color. borderwidth Sets the width (in px) or the border enclosing this color bar. dtick Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" exponentformat Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. len Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends. lenmode Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot "fraction" or in *pixels. Use `len` to set the value. nticks Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". outlinecolor Sets the axis line color. outlinewidth Sets the width (in px) of the axis line. separatethousands If "true", even 4-digit integers are separated showexponent If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. thickness Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels. thicknessmode Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot "fraction" or in "pixels". Use `thickness` to set the value. tick0 Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the color bar's tick label font tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api- reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" tickformatstops A tuple of :class:`plotly.graph_objects.scatter3d.line. colorbar.Tickformatstop` instances or dicts with compatible properties tickformatstopdefaults When used in a template (as layout.template.data.scatte r3d.line.colorbar.tickformatstopdefaults), sets the default property values to use for elements of scatter3d.line.colorbar.tickformatstops ticklen Sets the tick length (in px). tickmode Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. ticktext Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to "array". Used with `tickvals`. ticktextsrc Sets the source reference on Chart Studio Cloud for ticktext . tickvals Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to "array". Used with `ticktext`. tickvalssrc Sets the source reference on Chart Studio Cloud for tickvals . tickwidth Sets the tick width (in px). title :class:`plotly.graph_objects.scatter3d.line.colorbar.Ti tle` instance or dict with compatible properties titlefont Deprecated: Please use scatter3d.line.colorbar.title.font instead. Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. titleside Deprecated: Please use scatter3d.line.colorbar.title.side instead. Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. x Sets the x position of the color bar (in plot fraction). xanchor Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the color bar. xpad Sets the amount of padding (in px) along the x direction. y Sets the y position of the color bar (in plot fraction). yanchor Sets this color bar's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the color bar. ypad Sets the amount of padding (in px) along the y direction. Returns ------- ColorBar """ super(ColorBar, self).__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.scatter3d.line.ColorBar constructor must be a dict or an instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("bgcolor", None) _v = bgcolor if bgcolor is not None else _v if _v is not None: self["bgcolor"] = _v _v = arg.pop("bordercolor", None) _v = bordercolor if bordercolor is not None else _v if _v is not None: self["bordercolor"] = _v _v = arg.pop("borderwidth", None) _v = borderwidth if borderwidth is not None else _v if _v is not None: self["borderwidth"] = _v _v = arg.pop("dtick", None) _v = dtick if dtick is not None else _v if _v is not None: self["dtick"] = _v _v = arg.pop("exponentformat", None) _v = exponentformat if exponentformat is not None else _v if _v is not None: self["exponentformat"] = _v _v = arg.pop("len", None) _v = len if len is not None else _v if _v is not None: self["len"] = _v _v = arg.pop("lenmode", None) _v = lenmode if lenmode is not None else _v if _v is not None: self["lenmode"] = _v _v = arg.pop("nticks", None) _v = nticks if nticks is not None else _v if _v is not None: self["nticks"] = _v _v = arg.pop("outlinecolor", None) _v = outlinecolor if outlinecolor is not None else _v if _v is not None: self["outlinecolor"] = _v _v = arg.pop("outlinewidth", None) _v = outlinewidth if outlinewidth is not None else _v if _v is not None: self["outlinewidth"] = _v _v = arg.pop("separatethousands", None) _v = separatethousands if separatethousands is not None else _v if _v is not None: self["separatethousands"] = _v _v = arg.pop("showexponent", None) _v = showexponent if showexponent is not None else _v if _v is not None: self["showexponent"] = _v _v = arg.pop("showticklabels", None) _v = showticklabels if showticklabels is not None else _v if _v is not None: self["showticklabels"] = _v _v = arg.pop("showtickprefix", None) _v = showtickprefix if showtickprefix is not None else _v if _v is not None: self["showtickprefix"] = _v _v = arg.pop("showticksuffix", None) _v = showticksuffix if showticksuffix is not None else _v if _v is not None: self["showticksuffix"] = _v _v = arg.pop("thickness", None) _v = thickness if thickness is not None else _v if _v is not None: self["thickness"] = _v _v = arg.pop("thicknessmode", None) _v = thicknessmode if thicknessmode is not None else _v if _v is not None: self["thicknessmode"] = _v _v = arg.pop("tick0", None) _v = tick0 if tick0 is not None else _v if _v is not None: self["tick0"] = _v _v = arg.pop("tickangle", None) _v = tickangle if tickangle is not None else _v if _v is not None: self["tickangle"] = _v _v = arg.pop("tickcolor", None) _v = tickcolor if tickcolor is not None else _v if _v is not None: self["tickcolor"] = _v _v = arg.pop("tickfont", None) _v = tickfont if tickfont is not None else _v if _v is not None: self["tickfont"] = _v _v = arg.pop("tickformat", None) _v = tickformat if tickformat is not None else _v if _v is not None: self["tickformat"] = _v _v = arg.pop("tickformatstops", None) _v = tickformatstops if tickformatstops is not None else _v if _v is not None: self["tickformatstops"] = _v _v = arg.pop("tickformatstopdefaults", None) _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v if _v is not None: self["tickformatstopdefaults"] = _v _v = arg.pop("ticklen", None) _v = ticklen if ticklen is not None else _v if _v is not None: self["ticklen"] = _v _v = arg.pop("tickmode", None) _v = tickmode if tickmode is not None else _v if _v is not None: self["tickmode"] = _v _v = arg.pop("tickprefix", None) _v = tickprefix if tickprefix is not None else _v if _v is not None: self["tickprefix"] = _v _v = arg.pop("ticks", None) _v = ticks if ticks is not None else _v if _v is not None: self["ticks"] = _v _v = arg.pop("ticksuffix", None) _v = ticksuffix if ticksuffix is not None else _v if _v is not None: self["ticksuffix"] = _v _v = arg.pop("ticktext", None) _v = ticktext if ticktext is not None else _v if _v is not None: self["ticktext"] = _v _v = arg.pop("ticktextsrc", None) _v = ticktextsrc if ticktextsrc is not None else _v if _v is not None: self["ticktextsrc"] = _v _v = arg.pop("tickvals", None) _v = tickvals if tickvals is not None else _v if _v is not None: self["tickvals"] = _v _v = arg.pop("tickvalssrc", None) _v = tickvalssrc if tickvalssrc is not None else _v if _v is not None: self["tickvalssrc"] = _v _v = arg.pop("tickwidth", None) _v = tickwidth if tickwidth is not None else _v if _v is not None: self["tickwidth"] = _v _v = arg.pop("title", None) _v = title if title is not None else _v if _v is not None: self["title"] = _v _v = arg.pop("titlefont", None) _v = titlefont if titlefont is not None else _v if _v is not None: self["titlefont"] = _v _v = arg.pop("titleside", None) _v = titleside if titleside is not None else _v if _v is not None: self["titleside"] = _v _v = arg.pop("x", None) _v = x if x is not None else _v if _v is not None: self["x"] = _v _v = arg.pop("xanchor", None) _v = xanchor if xanchor is not None else _v if _v is not None: self["xanchor"] = _v _v = arg.pop("xpad", None) _v = xpad if xpad is not None else _v if _v is not None: self["xpad"] = _v _v = arg.pop("y", None) _v = y if y is not None else _v if _v is not None: self["y"] = _v _v = arg.pop("yanchor", None) _v = yanchor if yanchor is not None else _v if _v is not None: self["yanchor"] = _v _v = arg.pop("ypad", None) _v = ypad if ypad is not None else _v if _v is not None: self["ypad"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "bgcolor", "=", "None", ",", "bordercolor", "=", "None", ",", "borderwidth", "=", "None", ",", "dtick", "=", "None", ",", "exponentformat", "=", "None", ",", "len", "=", "None", ",", "lenmode", "=", "None", ",", "nticks", "=", "None", ",", "outlinecolor", "=", "None", ",", "outlinewidth", "=", "None", ",", "separatethousands", "=", "None", ",", "showexponent", "=", "None", ",", "showticklabels", "=", "None", ",", "showtickprefix", "=", "None", ",", "showticksuffix", "=", "None", ",", "thickness", "=", "None", ",", "thicknessmode", "=", "None", ",", "tick0", "=", "None", ",", "tickangle", "=", "None", ",", "tickcolor", "=", "None", ",", "tickfont", "=", "None", ",", "tickformat", "=", "None", ",", "tickformatstops", "=", "None", ",", "tickformatstopdefaults", "=", "None", ",", "ticklen", "=", "None", ",", "tickmode", "=", "None", ",", "tickprefix", "=", "None", ",", "ticks", "=", "None", ",", "ticksuffix", "=", "None", ",", "ticktext", "=", "None", ",", "ticktextsrc", "=", "None", ",", "tickvals", "=", "None", ",", "tickvalssrc", "=", "None", ",", "tickwidth", "=", "None", ",", "title", "=", "None", ",", "titlefont", "=", "None", ",", "titleside", "=", "None", ",", "x", "=", "None", ",", "xanchor", "=", "None", ",", "xpad", "=", "None", ",", "y", "=", "None", ",", "yanchor", "=", "None", ",", "ypad", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "ColorBar", ",", "self", ")", ".", "__init__", "(", "\"colorbar\"", ")", "if", "\"_parent\"", "in", "kwargs", ":", "self", ".", "_parent", "=", "kwargs", "[", "\"_parent\"", "]", "return", "# Validate arg", "# ------------", "if", "arg", "is", "None", ":", "arg", "=", "{", "}", "elif", "isinstance", "(", "arg", ",", "self", ".", "__class__", ")", ":", "arg", "=", "arg", ".", "to_plotly_json", "(", ")", "elif", "isinstance", "(", "arg", ",", "dict", ")", ":", "arg", "=", "_copy", ".", "copy", "(", "arg", ")", "else", ":", "raise", "ValueError", "(", "\"\"\"\\\nThe first argument to the plotly.graph_objs.scatter3d.line.ColorBar \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar`\"\"\"", ")", "# Handle skip_invalid", "# -------------------", "self", ".", "_skip_invalid", "=", "kwargs", ".", "pop", "(", "\"skip_invalid\"", ",", "False", ")", "self", ".", "_validate", "=", "kwargs", ".", "pop", "(", "\"_validate\"", ",", "True", ")", "# Populate data dict with properties", "# ----------------------------------", "_v", "=", "arg", ".", "pop", "(", "\"bgcolor\"", ",", "None", ")", "_v", "=", "bgcolor", "if", "bgcolor", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"bgcolor\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"bordercolor\"", ",", "None", ")", "_v", "=", "bordercolor", "if", "bordercolor", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"bordercolor\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"borderwidth\"", ",", "None", ")", "_v", "=", "borderwidth", "if", "borderwidth", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"borderwidth\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"dtick\"", ",", "None", ")", "_v", "=", "dtick", "if", "dtick", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"dtick\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"exponentformat\"", ",", "None", ")", "_v", "=", "exponentformat", "if", "exponentformat", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"exponentformat\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"len\"", ",", "None", ")", "_v", "=", "len", "if", "len", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"len\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"lenmode\"", ",", "None", ")", "_v", "=", "lenmode", "if", "lenmode", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"lenmode\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"nticks\"", ",", "None", ")", "_v", "=", "nticks", "if", "nticks", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"nticks\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"outlinecolor\"", ",", "None", ")", "_v", "=", "outlinecolor", "if", "outlinecolor", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"outlinecolor\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"outlinewidth\"", ",", "None", ")", "_v", "=", "outlinewidth", "if", "outlinewidth", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"outlinewidth\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"separatethousands\"", ",", "None", ")", "_v", "=", "separatethousands", "if", "separatethousands", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"separatethousands\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"showexponent\"", ",", "None", ")", "_v", "=", "showexponent", "if", "showexponent", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"showexponent\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"showticklabels\"", ",", "None", ")", "_v", "=", "showticklabels", "if", "showticklabels", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"showticklabels\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"showtickprefix\"", ",", "None", ")", "_v", "=", "showtickprefix", "if", "showtickprefix", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"showtickprefix\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"showticksuffix\"", ",", "None", ")", "_v", "=", "showticksuffix", "if", "showticksuffix", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"showticksuffix\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"thickness\"", ",", "None", ")", "_v", "=", "thickness", "if", "thickness", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"thickness\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"thicknessmode\"", ",", "None", ")", "_v", "=", "thicknessmode", "if", "thicknessmode", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"thicknessmode\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tick0\"", ",", "None", ")", "_v", "=", "tick0", "if", "tick0", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tick0\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickangle\"", ",", "None", ")", "_v", "=", "tickangle", "if", "tickangle", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickangle\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickcolor\"", ",", "None", ")", "_v", "=", "tickcolor", "if", "tickcolor", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickcolor\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickfont\"", ",", "None", ")", "_v", "=", "tickfont", "if", "tickfont", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickfont\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickformat\"", ",", "None", ")", "_v", "=", "tickformat", "if", "tickformat", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickformat\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickformatstops\"", ",", "None", ")", "_v", "=", "tickformatstops", "if", "tickformatstops", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickformatstops\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickformatstopdefaults\"", ",", "None", ")", "_v", "=", "tickformatstopdefaults", "if", "tickformatstopdefaults", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickformatstopdefaults\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"ticklen\"", ",", "None", ")", "_v", "=", "ticklen", "if", "ticklen", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"ticklen\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickmode\"", ",", "None", ")", "_v", "=", "tickmode", "if", "tickmode", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickmode\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickprefix\"", ",", "None", ")", "_v", "=", "tickprefix", "if", "tickprefix", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickprefix\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"ticks\"", ",", "None", ")", "_v", "=", "ticks", "if", "ticks", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"ticks\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"ticksuffix\"", ",", "None", ")", "_v", "=", "ticksuffix", "if", "ticksuffix", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"ticksuffix\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"ticktext\"", ",", "None", ")", "_v", "=", "ticktext", "if", "ticktext", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"ticktext\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"ticktextsrc\"", ",", "None", ")", "_v", "=", "ticktextsrc", "if", "ticktextsrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"ticktextsrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickvals\"", ",", "None", ")", "_v", "=", "tickvals", "if", "tickvals", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickvals\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickvalssrc\"", ",", "None", ")", "_v", "=", "tickvalssrc", "if", "tickvalssrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickvalssrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"tickwidth\"", ",", "None", ")", "_v", "=", "tickwidth", "if", "tickwidth", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"tickwidth\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"title\"", ",", "None", ")", "_v", "=", "title", "if", "title", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"title\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"titlefont\"", ",", "None", ")", "_v", "=", "titlefont", "if", "titlefont", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"titlefont\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"titleside\"", ",", "None", ")", "_v", "=", "titleside", "if", "titleside", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"titleside\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"x\"", ",", "None", ")", "_v", "=", "x", "if", "x", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"x\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"xanchor\"", ",", "None", ")", "_v", "=", "xanchor", "if", "xanchor", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"xanchor\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"xpad\"", ",", "None", ")", "_v", "=", "xpad", "if", "xpad", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"xpad\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"y\"", ",", "None", ")", "_v", "=", "y", "if", "y", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"y\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"yanchor\"", ",", "None", ")", "_v", "=", "yanchor", "if", "yanchor", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"yanchor\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"ypad\"", ",", "None", ")", "_v", "=", "ypad", "if", "ypad", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"ypad\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 1482, 4 ]
[ 1941, 34 ]
python
en
['en', 'error', 'th']
False
Domain.column
(self)
If there is a layout grid, use the domain for this column in the grid for this ternary subplot . The 'column' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int
If there is a layout grid, use the domain for this column in the grid for this ternary subplot . The 'column' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
def column(self): """ If there is a layout grid, use the domain for this column in the grid for this ternary subplot . The 'column' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int """ return self["column"]
[ "def", "column", "(", "self", ")", ":", "return", "self", "[", "\"column\"", "]" ]
[ 15, 4 ]
[ 28, 29 ]
python
en
['en', 'error', 'th']
False
Domain.row
(self)
If there is a layout grid, use the domain for this row in the grid for this ternary subplot . The 'row' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int
If there is a layout grid, use the domain for this row in the grid for this ternary subplot . The 'row' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
def row(self): """ If there is a layout grid, use the domain for this row in the grid for this ternary subplot . The 'row' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int """ return self["row"]
[ "def", "row", "(", "self", ")", ":", "return", "self", "[", "\"row\"", "]" ]
[ 37, 4 ]
[ 50, 26 ]
python
en
['en', 'error', 'th']
False
Domain.x
(self)
Sets the horizontal domain of this ternary subplot (in plot fraction). The 'x' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'x[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'x[1]' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- list
Sets the horizontal domain of this ternary subplot (in plot fraction). The 'x' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'x[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'x[1]' property is a number and may be specified as: - An int or float in the interval [0, 1]
def x(self): """ Sets the horizontal domain of this ternary subplot (in plot fraction). The 'x' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'x[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'x[1]' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- list """ return self["x"]
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 59, 4 ]
[ 76, 24 ]
python
en
['en', 'error', 'th']
False
Domain.y
(self)
Sets the vertical domain of this ternary subplot (in plot fraction). The 'y' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'y[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'y[1]' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- list
Sets the vertical domain of this ternary subplot (in plot fraction). The 'y' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'y[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'y[1]' property is a number and may be specified as: - An int or float in the interval [0, 1]
def y(self): """ Sets the vertical domain of this ternary subplot (in plot fraction). The 'y' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'y[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'y[1]' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- list """ return self["y"]
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 85, 4 ]
[ 102, 24 ]
python
en
['en', 'error', 'th']
False
Domain.__init__
(self, arg=None, column=None, row=None, x=None, y=None, **kwargs)
Construct a new Domain object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.ternary.Domain` column If there is a layout grid, use the domain for this column in the grid for this ternary subplot . row If there is a layout grid, use the domain for this row in the grid for this ternary subplot . x Sets the horizontal domain of this ternary subplot (in plot fraction). y Sets the vertical domain of this ternary subplot (in plot fraction). Returns ------- Domain
Construct a new Domain object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.ternary.Domain` column If there is a layout grid, use the domain for this column in the grid for this ternary subplot . row If there is a layout grid, use the domain for this row in the grid for this ternary subplot . x Sets the horizontal domain of this ternary subplot (in plot fraction). y Sets the vertical domain of this ternary subplot (in plot fraction).
def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): """ Construct a new Domain object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.ternary.Domain` column If there is a layout grid, use the domain for this column in the grid for this ternary subplot . row If there is a layout grid, use the domain for this row in the grid for this ternary subplot . x Sets the horizontal domain of this ternary subplot (in plot fraction). y Sets the vertical domain of this ternary subplot (in plot fraction). Returns ------- Domain """ super(Domain, self).__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.layout.ternary.Domain constructor must be a dict or an instance of :class:`plotly.graph_objs.layout.ternary.Domain`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("column", None) _v = column if column is not None else _v if _v is not None: self["column"] = _v _v = arg.pop("row", None) _v = row if row is not None else _v if _v is not None: self["row"] = _v _v = arg.pop("x", None) _v = x if x is not None else _v if _v is not None: self["x"] = _v _v = arg.pop("y", None) _v = y if y is not None else _v if _v is not None: self["y"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "column", "=", "None", ",", "row", "=", "None", ",", "x", "=", "None", ",", "y", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Domain", ",", "self", ")", ".", "__init__", "(", "\"domain\"", ")", "if", "\"_parent\"", "in", "kwargs", ":", "self", ".", "_parent", "=", "kwargs", "[", "\"_parent\"", "]", "return", "# Validate arg", "# ------------", "if", "arg", "is", "None", ":", "arg", "=", "{", "}", "elif", "isinstance", "(", "arg", ",", "self", ".", "__class__", ")", ":", "arg", "=", "arg", ".", "to_plotly_json", "(", ")", "elif", "isinstance", "(", "arg", ",", "dict", ")", ":", "arg", "=", "_copy", ".", "copy", "(", "arg", ")", "else", ":", "raise", "ValueError", "(", "\"\"\"\\\nThe first argument to the plotly.graph_objs.layout.ternary.Domain \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.layout.ternary.Domain`\"\"\"", ")", "# Handle skip_invalid", "# -------------------", "self", ".", "_skip_invalid", "=", "kwargs", ".", "pop", "(", "\"skip_invalid\"", ",", "False", ")", "self", ".", "_validate", "=", "kwargs", ".", "pop", "(", "\"_validate\"", ",", "True", ")", "# Populate data dict with properties", "# ----------------------------------", "_v", "=", "arg", ".", "pop", "(", "\"column\"", ",", "None", ")", "_v", "=", "column", "if", "column", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"column\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"row\"", ",", "None", ")", "_v", "=", "row", "if", "row", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"row\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"x\"", ",", "None", ")", "_v", "=", "x", "if", "x", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"x\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"y\"", ",", "None", ")", "_v", "=", "y", "if", "y", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"y\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 127, 4 ]
[ 206, 34 ]
python
en
['en', 'error', 'th']
False
repeat
(tensor, K)
[B, ...] => [B*K, ...] #-- Important --# Used unsqueeze and transpose to avoid [K*B] when using torch.Tensor.repeat
[B, ...] => [B*K, ...]
def repeat(tensor, K): """ [B, ...] => [B*K, ...] #-- Important --# Used unsqueeze and transpose to avoid [K*B] when using torch.Tensor.repeat """ if isinstance(tensor, torch.Tensor): B, *size = tensor.size() # repeat_size = [1] + [K] + [1] * (tensor.dim() - 1) # tensor = tensor.unsqueeze(1).repeat(*repeat_size).view(B * K, *size) expand_size = B, K, *size tensor = tensor.unsqueeze(1).expand( *expand_size).contiguous().view(B * K, *size) return tensor elif isinstance(tensor, list): out = [] for x in tensor: for _ in range(K): out.append(x.copy()) return out
[ "def", "repeat", "(", "tensor", ",", "K", ")", ":", "if", "isinstance", "(", "tensor", ",", "torch", ".", "Tensor", ")", ":", "B", ",", "", "*", "size", "=", "tensor", ".", "size", "(", ")", "# repeat_size = [1] + [K] + [1] * (tensor.dim() - 1)", "# tensor = tensor.unsqueeze(1).repeat(*repeat_size).view(B * K, *size)", "expand_size", "=", "B", ",", "K", ",", "", "*", "size", "tensor", "=", "tensor", ".", "unsqueeze", "(", "1", ")", ".", "expand", "(", "*", "expand_size", ")", ".", "contiguous", "(", ")", ".", "view", "(", "B", "*", "K", ",", "*", "size", ")", "return", "tensor", "elif", "isinstance", "(", "tensor", ",", "list", ")", ":", "out", "=", "[", "]", "for", "x", "in", "tensor", ":", "for", "_", "in", "range", "(", "K", ")", ":", "out", ".", "append", "(", "x", ".", "copy", "(", ")", ")", "return", "out" ]
[ 281, 0 ]
[ 301, 18 ]
python
en
['en', 'error', 'th']
False
Seq2Seq.__init__
(self, vocab_size: int = 20000, word_embed_size: int = 300, answer_position_embed_size: int = 16, ner_embed_size: int = 16, pos_embed_size: int = 16, case_embed_size: int = 16, position_embed_size: int = 16, focus_embed_size: int = 16, enc_hidden_size: int = 512, dec_hidden_size: int = 256, num_layers: int = 1, dropout_p: float = 0.5, tie: bool = False, rnn: str = 'GRU', use_focus: bool = False, task: str = 'QG', model: str = 'NQG', feature_rich: bool = False, n_mixture=None)
Neural Question Generation from Text: A Preliminary Study (Zhou et al. NLPCC 2017) Get To The Point: Summarization with Pointer-Generator Networks (See et al. ACL 2017)
Neural Question Generation from Text: A Preliminary Study (Zhou et al. NLPCC 2017) Get To The Point: Summarization with Pointer-Generator Networks (See et al. ACL 2017)
def __init__(self, vocab_size: int = 20000, word_embed_size: int = 300, answer_position_embed_size: int = 16, ner_embed_size: int = 16, pos_embed_size: int = 16, case_embed_size: int = 16, position_embed_size: int = 16, focus_embed_size: int = 16, enc_hidden_size: int = 512, dec_hidden_size: int = 256, num_layers: int = 1, dropout_p: float = 0.5, tie: bool = False, rnn: str = 'GRU', use_focus: bool = False, task: str = 'QG', model: str = 'NQG', feature_rich: bool = False, n_mixture=None): """Neural Question Generation from Text: A Preliminary Study (Zhou et al. NLPCC 2017) Get To The Point: Summarization with Pointer-Generator Networks (See et al. ACL 2017) """ super().__init__() # ------ Hyperparameters ------# self.enc_hidden_size = enc_hidden_size self.dec_hidden_size = dec_hidden_size self.vocab_size = vocab_size self.tie = tie self.rnn_type = rnn self.use_focus = use_focus self.n_mixture = n_mixture self.model = model self.task = task self.feature_rich = feature_rich if model == 'NQG': assert feature_rich == True # ------ Modules ------# # [0,1,2,3] => [PAD, UNK, SOS, EOS] self.word_embed = nn.Embedding( vocab_size, word_embed_size, padding_idx=0) self.encoder = FocusedEncoder( word_embed_size, answer_position_embed_size, ner_embed_size, pos_embed_size, case_embed_size, focus_embed_size, enc_hidden_size, num_layers, dropout_p, rnn_type=self.rnn_type, use_focus=use_focus, model=model, feature_rich=feature_rich) self.encoder.word_embed = self.word_embed if feature_rich: self.answer_position_embed = nn.Embedding( 4, answer_position_embed_size, padding_idx=-1) # BIO encoding self.ner_embed = nn.Embedding(13, ner_embed_size, padding_idx=-1) self.pos_embed = nn.Embedding(46, pos_embed_size, padding_idx=-1) self.case_embed = nn.Embedding( 3, case_embed_size, padding_idx=-1) # Binary self.encoder.answer_position_embed = self.answer_position_embed self.encoder.ner_embed = self.ner_embed self.encoder.pos_embed = self.pos_embed self.encoder.case_embed = self.case_embed else: self.answer_position_embed = None self.ner_embed = None self.pos_embed = None self.case_embed = None if use_focus: self.focus_embed = nn.Embedding( 3, focus_embed_size, padding_idx=-1) # Binary self.encoder.focus_embed = self.focus_embed # for using encoder's hidden state as decoder input if model == 'NQG': self.bridge = LinearBridge( enc_hidden_size, dec_hidden_size, rnn, 'tanh') elif model == 'PG': self.bridge = LinearBridge( enc_hidden_size, dec_hidden_size, rnn, 'ReLU') if model == 'NQG': self.decoder = NQGDecoder(word_embed_size, enc_hidden_size=enc_hidden_size, dec_hidden_size=dec_hidden_size, attention_size=700, # attention_size=dec_hidden_size, vocab_size=vocab_size, dropout_p=dropout_p, rnn=rnn, tie=tie, n_mixture=n_mixture) elif model == 'PG': self.decoder = PGDecoder(word_embed_size, enc_hidden_size=enc_hidden_size, dec_hidden_size=dec_hidden_size, # attention_size=dec_hidden_size, vocab_size=vocab_size, dropout_p=0, rnn=rnn, tie=tie, n_mixture=n_mixture) self.decoder.word_embed = self.word_embed if tie: self.decoder.readout.Wo.weight = self.word_embed.weight
[ "def", "__init__", "(", "self", ",", "vocab_size", ":", "int", "=", "20000", ",", "word_embed_size", ":", "int", "=", "300", ",", "answer_position_embed_size", ":", "int", "=", "16", ",", "ner_embed_size", ":", "int", "=", "16", ",", "pos_embed_size", ":", "int", "=", "16", ",", "case_embed_size", ":", "int", "=", "16", ",", "position_embed_size", ":", "int", "=", "16", ",", "focus_embed_size", ":", "int", "=", "16", ",", "enc_hidden_size", ":", "int", "=", "512", ",", "dec_hidden_size", ":", "int", "=", "256", ",", "num_layers", ":", "int", "=", "1", ",", "dropout_p", ":", "float", "=", "0.5", ",", "tie", ":", "bool", "=", "False", ",", "rnn", ":", "str", "=", "'GRU'", ",", "use_focus", ":", "bool", "=", "False", ",", "task", ":", "str", "=", "'QG'", ",", "model", ":", "str", "=", "'NQG'", ",", "feature_rich", ":", "bool", "=", "False", ",", "n_mixture", "=", "None", ")", ":", "super", "(", ")", ".", "__init__", "(", ")", "# ------ Hyperparameters ------#", "self", ".", "enc_hidden_size", "=", "enc_hidden_size", "self", ".", "dec_hidden_size", "=", "dec_hidden_size", "self", ".", "vocab_size", "=", "vocab_size", "self", ".", "tie", "=", "tie", "self", ".", "rnn_type", "=", "rnn", "self", ".", "use_focus", "=", "use_focus", "self", ".", "n_mixture", "=", "n_mixture", "self", ".", "model", "=", "model", "self", ".", "task", "=", "task", "self", ".", "feature_rich", "=", "feature_rich", "if", "model", "==", "'NQG'", ":", "assert", "feature_rich", "==", "True", "# ------ Modules ------#", "# [0,1,2,3] => [PAD, UNK, SOS, EOS]", "self", ".", "word_embed", "=", "nn", ".", "Embedding", "(", "vocab_size", ",", "word_embed_size", ",", "padding_idx", "=", "0", ")", "self", ".", "encoder", "=", "FocusedEncoder", "(", "word_embed_size", ",", "answer_position_embed_size", ",", "ner_embed_size", ",", "pos_embed_size", ",", "case_embed_size", ",", "focus_embed_size", ",", "enc_hidden_size", ",", "num_layers", ",", "dropout_p", ",", "rnn_type", "=", "self", ".", "rnn_type", ",", "use_focus", "=", "use_focus", ",", "model", "=", "model", ",", "feature_rich", "=", "feature_rich", ")", "self", ".", "encoder", ".", "word_embed", "=", "self", ".", "word_embed", "if", "feature_rich", ":", "self", ".", "answer_position_embed", "=", "nn", ".", "Embedding", "(", "4", ",", "answer_position_embed_size", ",", "padding_idx", "=", "-", "1", ")", "# BIO encoding", "self", ".", "ner_embed", "=", "nn", ".", "Embedding", "(", "13", ",", "ner_embed_size", ",", "padding_idx", "=", "-", "1", ")", "self", ".", "pos_embed", "=", "nn", ".", "Embedding", "(", "46", ",", "pos_embed_size", ",", "padding_idx", "=", "-", "1", ")", "self", ".", "case_embed", "=", "nn", ".", "Embedding", "(", "3", ",", "case_embed_size", ",", "padding_idx", "=", "-", "1", ")", "# Binary", "self", ".", "encoder", ".", "answer_position_embed", "=", "self", ".", "answer_position_embed", "self", ".", "encoder", ".", "ner_embed", "=", "self", ".", "ner_embed", "self", ".", "encoder", ".", "pos_embed", "=", "self", ".", "pos_embed", "self", ".", "encoder", ".", "case_embed", "=", "self", ".", "case_embed", "else", ":", "self", ".", "answer_position_embed", "=", "None", "self", ".", "ner_embed", "=", "None", "self", ".", "pos_embed", "=", "None", "self", ".", "case_embed", "=", "None", "if", "use_focus", ":", "self", ".", "focus_embed", "=", "nn", ".", "Embedding", "(", "3", ",", "focus_embed_size", ",", "padding_idx", "=", "-", "1", ")", "# Binary", "self", ".", "encoder", ".", "focus_embed", "=", "self", ".", "focus_embed", "# for using encoder's hidden state as decoder input", "if", "model", "==", "'NQG'", ":", "self", ".", "bridge", "=", "LinearBridge", "(", "enc_hidden_size", ",", "dec_hidden_size", ",", "rnn", ",", "'tanh'", ")", "elif", "model", "==", "'PG'", ":", "self", ".", "bridge", "=", "LinearBridge", "(", "enc_hidden_size", ",", "dec_hidden_size", ",", "rnn", ",", "'ReLU'", ")", "if", "model", "==", "'NQG'", ":", "self", ".", "decoder", "=", "NQGDecoder", "(", "word_embed_size", ",", "enc_hidden_size", "=", "enc_hidden_size", ",", "dec_hidden_size", "=", "dec_hidden_size", ",", "attention_size", "=", "700", ",", "# attention_size=dec_hidden_size,", "vocab_size", "=", "vocab_size", ",", "dropout_p", "=", "dropout_p", ",", "rnn", "=", "rnn", ",", "tie", "=", "tie", ",", "n_mixture", "=", "n_mixture", ")", "elif", "model", "==", "'PG'", ":", "self", ".", "decoder", "=", "PGDecoder", "(", "word_embed_size", ",", "enc_hidden_size", "=", "enc_hidden_size", ",", "dec_hidden_size", "=", "dec_hidden_size", ",", "# attention_size=dec_hidden_size,", "vocab_size", "=", "vocab_size", ",", "dropout_p", "=", "0", ",", "rnn", "=", "rnn", ",", "tie", "=", "tie", ",", "n_mixture", "=", "n_mixture", ")", "self", ".", "decoder", ".", "word_embed", "=", "self", ".", "word_embed", "if", "tie", ":", "self", ".", "decoder", ".", "readout", ".", "Wo", ".", "weight", "=", "self", ".", "word_embed", ".", "weight" ]
[ 98, 4 ]
[ 200, 67 ]
python
en
['en', 'en', 'en']
True
Domain.column
(self)
If there is a layout grid, use the domain for this column in the grid for this pie trace . The 'column' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int
If there is a layout grid, use the domain for this column in the grid for this pie trace . The 'column' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
def column(self): """ If there is a layout grid, use the domain for this column in the grid for this pie trace . The 'column' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int """ return self["column"]
[ "def", "column", "(", "self", ")", ":", "return", "self", "[", "\"column\"", "]" ]
[ 15, 4 ]
[ 28, 29 ]
python
en
['en', 'error', 'th']
False
Domain.row
(self)
If there is a layout grid, use the domain for this row in the grid for this pie trace . The 'row' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int
If there is a layout grid, use the domain for this row in the grid for this pie trace . The 'row' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
def row(self): """ If there is a layout grid, use the domain for this row in the grid for this pie trace . The 'row' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int """ return self["row"]
[ "def", "row", "(", "self", ")", ":", "return", "self", "[", "\"row\"", "]" ]
[ 37, 4 ]
[ 50, 26 ]
python
en
['en', 'error', 'th']
False
Domain.x
(self)
Sets the horizontal domain of this pie trace (in plot fraction). The 'x' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'x[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'x[1]' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- list
Sets the horizontal domain of this pie trace (in plot fraction). The 'x' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'x[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'x[1]' property is a number and may be specified as: - An int or float in the interval [0, 1]
def x(self): """ Sets the horizontal domain of this pie trace (in plot fraction). The 'x' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'x[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'x[1]' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- list """ return self["x"]
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 59, 4 ]
[ 76, 24 ]
python
en
['en', 'error', 'th']
False
Domain.y
(self)
Sets the vertical domain of this pie trace (in plot fraction). The 'y' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'y[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'y[1]' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- list
Sets the vertical domain of this pie trace (in plot fraction). The 'y' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'y[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'y[1]' property is a number and may be specified as: - An int or float in the interval [0, 1]
def y(self): """ Sets the vertical domain of this pie trace (in plot fraction). The 'y' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'y[0]' property is a number and may be specified as: - An int or float in the interval [0, 1] (1) The 'y[1]' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- list """ return self["y"]
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 85, 4 ]
[ 101, 24 ]
python
en
['en', 'error', 'th']
False
Domain.__init__
(self, arg=None, column=None, row=None, x=None, y=None, **kwargs)
Construct a new Domain object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.pie.Domain` column If there is a layout grid, use the domain for this column in the grid for this pie trace . row If there is a layout grid, use the domain for this row in the grid for this pie trace . x Sets the horizontal domain of this pie trace (in plot fraction). y Sets the vertical domain of this pie trace (in plot fraction). Returns ------- Domain
Construct a new Domain object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.pie.Domain` column If there is a layout grid, use the domain for this column in the grid for this pie trace . row If there is a layout grid, use the domain for this row in the grid for this pie trace . x Sets the horizontal domain of this pie trace (in plot fraction). y Sets the vertical domain of this pie trace (in plot fraction).
def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): """ Construct a new Domain object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.pie.Domain` column If there is a layout grid, use the domain for this column in the grid for this pie trace . row If there is a layout grid, use the domain for this row in the grid for this pie trace . x Sets the horizontal domain of this pie trace (in plot fraction). y Sets the vertical domain of this pie trace (in plot fraction). Returns ------- Domain """ super(Domain, self).__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.pie.Domain constructor must be a dict or an instance of :class:`plotly.graph_objs.pie.Domain`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("column", None) _v = column if column is not None else _v if _v is not None: self["column"] = _v _v = arg.pop("row", None) _v = row if row is not None else _v if _v is not None: self["row"] = _v _v = arg.pop("x", None) _v = x if x is not None else _v if _v is not None: self["x"] = _v _v = arg.pop("y", None) _v = y if y is not None else _v if _v is not None: self["y"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "column", "=", "None", ",", "row", "=", "None", ",", "x", "=", "None", ",", "y", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Domain", ",", "self", ")", ".", "__init__", "(", "\"domain\"", ")", "if", "\"_parent\"", "in", "kwargs", ":", "self", ".", "_parent", "=", "kwargs", "[", "\"_parent\"", "]", "return", "# Validate arg", "# ------------", "if", "arg", "is", "None", ":", "arg", "=", "{", "}", "elif", "isinstance", "(", "arg", ",", "self", ".", "__class__", ")", ":", "arg", "=", "arg", ".", "to_plotly_json", "(", ")", "elif", "isinstance", "(", "arg", ",", "dict", ")", ":", "arg", "=", "_copy", ".", "copy", "(", "arg", ")", "else", ":", "raise", "ValueError", "(", "\"\"\"\\\nThe first argument to the plotly.graph_objs.pie.Domain \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.pie.Domain`\"\"\"", ")", "# Handle skip_invalid", "# -------------------", "self", ".", "_skip_invalid", "=", "kwargs", ".", "pop", "(", "\"skip_invalid\"", ",", "False", ")", "self", ".", "_validate", "=", "kwargs", ".", "pop", "(", "\"_validate\"", ",", "True", ")", "# Populate data dict with properties", "# ----------------------------------", "_v", "=", "arg", ".", "pop", "(", "\"column\"", ",", "None", ")", "_v", "=", "column", "if", "column", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"column\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"row\"", ",", "None", ")", "_v", "=", "row", "if", "row", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"row\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"x\"", ",", "None", ")", "_v", "=", "x", "if", "x", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"x\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"y\"", ",", "None", ")", "_v", "=", "y", "if", "y", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"y\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 126, 4 ]
[ 204, 34 ]
python
en
['en', 'error', 'th']
False
random
(*args, **kwargs)
Usage: $random() Returns a random value in the interval [0, 1)
Usage: $random() Returns a random value in the interval [0, 1)
def random(*args, **kwargs): """ Usage: $random() Returns a random value in the interval [0, 1) """ return base_random()
[ "def", "random", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "base_random", "(", ")" ]
[ 51, 0 ]
[ 57, 24 ]
python
en
['en', 'error', 'th']
False
randint
(*args, **kwargs)
Usage: $randint(start, end) Returns random integer in interval [start, end]
Usage: $randint(start, end) Returns random integer in interval [start, end]
def randint(*args, **kwargs): """ Usage: $randint(start, end) Returns random integer in interval [start, end] """ if len(args) != 2: raise TypeError("$randint needs two arguments - start and end.") start, end = int(args[0]), int(args[1]) return base_randint(start, end)
[ "def", "randint", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "len", "(", "args", ")", "!=", "2", ":", "raise", "TypeError", "(", "\"$randint needs two arguments - start and end.\"", ")", "start", ",", "end", "=", "int", "(", "args", "[", "0", "]", ")", ",", "int", "(", "args", "[", "1", "]", ")", "return", "base_randint", "(", "start", ",", "end", ")" ]
[ 60, 0 ]
[ 69, 35 ]
python
en
['en', 'error', 'th']
False
left_justify
(*args, **kwargs)
Usage: $left_justify(<text>) Returns <text> left-justified.
Usage: $left_justify(<text>) Returns <text> left-justified.
def left_justify(*args, **kwargs): """ Usage: $left_justify(<text>) Returns <text> left-justified. """ if args: return base_justify(args[0], align='l') return ""
[ "def", "left_justify", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "args", ":", "return", "base_justify", "(", "args", "[", "0", "]", ",", "align", "=", "'l'", ")", "return", "\"\"" ]
[ 72, 0 ]
[ 80, 13 ]
python
en
['en', 'error', 'th']
False
right_justify
(*args, **kwargs)
Usage: $right_justify(<text>) Returns <text> right-justified across screen width.
Usage: $right_justify(<text>) Returns <text> right-justified across screen width.
def right_justify(*args, **kwargs): """ Usage: $right_justify(<text>) Returns <text> right-justified across screen width. """ if args: return base_justify(args[0], align='r') return ""
[ "def", "right_justify", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "args", ":", "return", "base_justify", "(", "args", "[", "0", "]", ",", "align", "=", "'r'", ")", "return", "\"\"" ]
[ 83, 0 ]
[ 91, 13 ]
python
en
['en', 'error', 'th']
False
center_justify
(*args, **kwargs)
Usage: $center_justify(<text>) Returns <text> centered in screen width.
Usage: $center_justify(<text>) Returns <text> centered in screen width.
def center_justify(*args, **kwargs): """ Usage: $center_justify(<text>) Returns <text> centered in screen width. """ if args: return base_justify(args[0], align='c') return ""
[ "def", "center_justify", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "args", ":", "return", "base_justify", "(", "args", "[", "0", "]", ",", "align", "=", "'c'", ")", "return", "\"\"" ]
[ 94, 0 ]
[ 103, 13 ]
python
en
['en', 'error', 'th']
False
choice
(*args, **kwargs)
Usage: $choice(val, val, val, ...) Returns one of the values randomly
Usage: $choice(val, val, val, ...) Returns one of the values randomly
def choice(*args, **kwargs): """ Usage: $choice(val, val, val, ...) Returns one of the values randomly """ if args: return base_choice(args) return ""
[ "def", "choice", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "args", ":", "return", "base_choice", "(", "args", ")", "return", "\"\"" ]
[ 106, 0 ]
[ 113, 13 ]
python
en
['en', 'error', 'th']
False
full_justify
(*args, **kwargs)
Usage: $full_justify(<text>) Returns <text> filling up screen width by adding extra space.
Usage: $full_justify(<text>) Returns <text> filling up screen width by adding extra space.
def full_justify(*args, **kwargs): """ Usage: $full_justify(<text>) Returns <text> filling up screen width by adding extra space. """ if args: return base_justify(args[0], align='f') return ""
[ "def", "full_justify", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "args", ":", "return", "base_justify", "(", "args", "[", "0", "]", ",", "align", "=", "'f'", ")", "return", "\"\"" ]
[ 116, 0 ]
[ 125, 13 ]
python
en
['en', 'error', 'th']
False
protkey
(*args, **kwargs)
Usage: $protkey(<key>) Returns the value of another key in this prototoype. Will raise an error if the key is not found in this prototype.
Usage: $protkey(<key>) Returns the value of another key in this prototoype. Will raise an error if the key is not found in this prototype.
def protkey(*args, **kwargs): """ Usage: $protkey(<key>) Returns the value of another key in this prototoype. Will raise an error if the key is not found in this prototype. """ if args: prototype = kwargs['prototype'] return prototype[args[0].strip()]
[ "def", "protkey", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "args", ":", "prototype", "=", "kwargs", "[", "'prototype'", "]", "return", "prototype", "[", "args", "[", "0", "]", ".", "strip", "(", ")", "]" ]
[ 128, 0 ]
[ 137, 41 ]
python
en
['en', 'error', 'th']
False
add
(*args, **kwargs)
Usage: $add(val1, val2) Returns the result of val1 + val2. Values must be valid simple Python structures possible to add, such as numbers, lists etc.
Usage: $add(val1, val2) Returns the result of val1 + val2. Values must be valid simple Python structures possible to add, such as numbers, lists etc.
def add(*args, **kwargs): """ Usage: $add(val1, val2) Returns the result of val1 + val2. Values must be valid simple Python structures possible to add, such as numbers, lists etc. """ if len(args) > 1: val1, val2 = args[0], args[1] # try to convert to python structures, otherwise, keep as strings try: val1 = literal_eval(val1.strip()) except Exception: pass try: val2 = literal_eval(val2.strip()) except Exception: pass return val1 + val2 raise ValueError("$add requires two arguments.")
[ "def", "add", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "len", "(", "args", ")", ">", "1", ":", "val1", ",", "val2", "=", "args", "[", "0", "]", ",", "args", "[", "1", "]", "# try to convert to python structures, otherwise, keep as strings", "try", ":", "val1", "=", "literal_eval", "(", "val1", ".", "strip", "(", ")", ")", "except", "Exception", ":", "pass", "try", ":", "val2", "=", "literal_eval", "(", "val2", ".", "strip", "(", ")", ")", "except", "Exception", ":", "pass", "return", "val1", "+", "val2", "raise", "ValueError", "(", "\"$add requires two arguments.\"", ")" ]
[ 140, 0 ]
[ 160, 52 ]
python
en
['en', 'error', 'th']
False
sub
(*args, **kwargs)
Usage: $del(val1, val2) Returns the value of val1 - val2. Values must be valid simple Python structures possible to subtract.
Usage: $del(val1, val2) Returns the value of val1 - val2. Values must be valid simple Python structures possible to subtract.
def sub(*args, **kwargs): """ Usage: $del(val1, val2) Returns the value of val1 - val2. Values must be valid simple Python structures possible to subtract. """ if len(args) > 1: val1, val2 = args[0], args[1] # try to convert to python structures, otherwise, keep as strings try: val1 = literal_eval(val1.strip()) except Exception: pass try: val2 = literal_eval(val2.strip()) except Exception: pass return val1 - val2 raise ValueError("$sub requires two arguments.")
[ "def", "sub", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "len", "(", "args", ")", ">", "1", ":", "val1", ",", "val2", "=", "args", "[", "0", "]", ",", "args", "[", "1", "]", "# try to convert to python structures, otherwise, keep as strings", "try", ":", "val1", "=", "literal_eval", "(", "val1", ".", "strip", "(", ")", ")", "except", "Exception", ":", "pass", "try", ":", "val2", "=", "literal_eval", "(", "val2", ".", "strip", "(", ")", ")", "except", "Exception", ":", "pass", "return", "val1", "-", "val2", "raise", "ValueError", "(", "\"$sub requires two arguments.\"", ")" ]
[ 163, 0 ]
[ 183, 52 ]
python
en
['en', 'error', 'th']
False
mult
(*args, **kwargs)
Usage: $mul(val1, val2) Returns the value of val1 * val2. The values must be valid simple Python structures possible to multiply, like strings and/or numbers.
Usage: $mul(val1, val2) Returns the value of val1 * val2. The values must be valid simple Python structures possible to multiply, like strings and/or numbers.
def mult(*args, **kwargs): """ Usage: $mul(val1, val2) Returns the value of val1 * val2. The values must be valid simple Python structures possible to multiply, like strings and/or numbers. """ if len(args) > 1: val1, val2 = args[0], args[1] # try to convert to python structures, otherwise, keep as strings try: val1 = literal_eval(val1.strip()) except Exception: pass try: val2 = literal_eval(val2.strip()) except Exception: pass return val1 * val2 raise ValueError("$mul requires two arguments.")
[ "def", "mult", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "len", "(", "args", ")", ">", "1", ":", "val1", ",", "val2", "=", "args", "[", "0", "]", ",", "args", "[", "1", "]", "# try to convert to python structures, otherwise, keep as strings", "try", ":", "val1", "=", "literal_eval", "(", "val1", ".", "strip", "(", ")", ")", "except", "Exception", ":", "pass", "try", ":", "val2", "=", "literal_eval", "(", "val2", ".", "strip", "(", ")", ")", "except", "Exception", ":", "pass", "return", "val1", "*", "val2", "raise", "ValueError", "(", "\"$mul requires two arguments.\"", ")" ]
[ 186, 0 ]
[ 206, 52 ]
python
en
['en', 'error', 'th']
False
div
(*args, **kwargs)
Usage: $div(val1, val2) Returns the value of val1 / val2. Values must be numbers and the result is always a float.
Usage: $div(val1, val2) Returns the value of val1 / val2. Values must be numbers and the result is always a float.
def div(*args, **kwargs): """ Usage: $div(val1, val2) Returns the value of val1 / val2. Values must be numbers and the result is always a float. """ if len(args) > 1: val1, val2 = args[0], args[1] # try to convert to python structures, otherwise, keep as strings try: val1 = literal_eval(val1.strip()) except Exception: pass try: val2 = literal_eval(val2.strip()) except Exception: pass return val1 / float(val2) raise ValueError("$mult requires two arguments.")
[ "def", "div", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "len", "(", "args", ")", ">", "1", ":", "val1", ",", "val2", "=", "args", "[", "0", "]", ",", "args", "[", "1", "]", "# try to convert to python structures, otherwise, keep as strings", "try", ":", "val1", "=", "literal_eval", "(", "val1", ".", "strip", "(", ")", ")", "except", "Exception", ":", "pass", "try", ":", "val2", "=", "literal_eval", "(", "val2", ".", "strip", "(", ")", ")", "except", "Exception", ":", "pass", "return", "val1", "/", "float", "(", "val2", ")", "raise", "ValueError", "(", "\"$mult requires two arguments.\"", ")" ]
[ 209, 0 ]
[ 228, 53 ]
python
en
['en', 'error', 'th']
False
toint
(*args, **kwargs)
Usage: $toint(<number>) Returns <number> as an integer.
Usage: $toint(<number>) Returns <number> as an integer.
def toint(*args, **kwargs): """ Usage: $toint(<number>) Returns <number> as an integer. """ if args: val = args[0] try: return int(literal_eval(val.strip())) except ValueError: return val raise ValueError("$toint requires one argument.")
[ "def", "toint", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "args", ":", "val", "=", "args", "[", "0", "]", "try", ":", "return", "int", "(", "literal_eval", "(", "val", ".", "strip", "(", ")", ")", ")", "except", "ValueError", ":", "return", "val", "raise", "ValueError", "(", "\"$toint requires one argument.\"", ")" ]
[ 231, 0 ]
[ 242, 53 ]
python
en
['en', 'error', 'th']
False
eval
(*args, **kwargs)
Usage $eval(<expression>) Returns evaluation of a simple Python expression. The string may *only* consist of the following Python literal structures: strings, numbers, tuples, lists, dicts, booleans, and None. The strings can also contain #dbrefs. Escape embedded protfuncs as $$protfunc(..) - those will then be evaluated *after* $eval.
Usage $eval(<expression>) Returns evaluation of a simple Python expression. The string may *only* consist of the following Python literal structures: strings, numbers, tuples, lists, dicts, booleans, and None. The strings can also contain #dbrefs. Escape embedded protfuncs as $$protfunc(..) - those will then be evaluated *after* $eval.
def eval(*args, **kwargs): """ Usage $eval(<expression>) Returns evaluation of a simple Python expression. The string may *only* consist of the following Python literal structures: strings, numbers, tuples, lists, dicts, booleans, and None. The strings can also contain #dbrefs. Escape embedded protfuncs as $$protfunc(..) - those will then be evaluated *after* $eval. """ global _PROTLIB if not _PROTLIB: from evennia.prototypes import prototypes as _PROTLIB string = ",".join(args) struct = literal_eval(string) if isinstance(struct, basestring): # we must shield the string, otherwise it will be merged as a string and future # literal_evas will pick up e.g. '2' as something that should be converted to a number struct = '"{}"'.format(struct) # convert any #dbrefs to objects (also in nested structures) struct = _PROTLIB.value_to_obj_or_any(struct) return struct
[ "def", "eval", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "global", "_PROTLIB", "if", "not", "_PROTLIB", ":", "from", "evennia", ".", "prototypes", "import", "prototypes", "as", "_PROTLIB", "string", "=", "\",\"", ".", "join", "(", "args", ")", "struct", "=", "literal_eval", "(", "string", ")", "if", "isinstance", "(", "struct", ",", "basestring", ")", ":", "# we must shield the string, otherwise it will be merged as a string and future", "# literal_evas will pick up e.g. '2' as something that should be converted to a number", "struct", "=", "'\"{}\"'", ".", "format", "(", "struct", ")", "# convert any #dbrefs to objects (also in nested structures)", "struct", "=", "_PROTLIB", ".", "value_to_obj_or_any", "(", "struct", ")", "return", "struct" ]
[ 245, 0 ]
[ 269, 17 ]
python
en
['en', 'error', 'th']
False
_obj_search
(*args, **kwargs)
Helper function to search for an object
Helper function to search for an object
def _obj_search(*args, **kwargs): "Helper function to search for an object" query = "".join(args) session = kwargs.get("session", None) return_list = kwargs.pop("return_list", False) account = None if session: account = session.account targets = search.search_object(query) if return_list: retlist = [] if account: for target in targets: if target.access(account, target, 'control'): retlist.append(target) else: retlist = targets return retlist else: # single-match if not targets: raise ValueError("$obj: Query '{}' gave no matches.".format(query)) if len(targets) > 1: raise ValueError("$obj: Query '{query}' gave {nmatches} matches. Limit your " "query or use $objlist instead.".format( query=query, nmatches=len(targets))) target = targets[0] if account: if not target.access(account, target, 'control'): raise ValueError("$obj: Obj {target}(#{dbref} cannot be added - " "Account {account} does not have 'control' access.".format( target=target.key, dbref=target.id, account=account)) return target
[ "def", "_obj_search", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "query", "=", "\"\"", ".", "join", "(", "args", ")", "session", "=", "kwargs", ".", "get", "(", "\"session\"", ",", "None", ")", "return_list", "=", "kwargs", ".", "pop", "(", "\"return_list\"", ",", "False", ")", "account", "=", "None", "if", "session", ":", "account", "=", "session", ".", "account", "targets", "=", "search", ".", "search_object", "(", "query", ")", "if", "return_list", ":", "retlist", "=", "[", "]", "if", "account", ":", "for", "target", "in", "targets", ":", "if", "target", ".", "access", "(", "account", ",", "target", ",", "'control'", ")", ":", "retlist", ".", "append", "(", "target", ")", "else", ":", "retlist", "=", "targets", "return", "retlist", "else", ":", "# single-match", "if", "not", "targets", ":", "raise", "ValueError", "(", "\"$obj: Query '{}' gave no matches.\"", ".", "format", "(", "query", ")", ")", "if", "len", "(", "targets", ")", ">", "1", ":", "raise", "ValueError", "(", "\"$obj: Query '{query}' gave {nmatches} matches. Limit your \"", "\"query or use $objlist instead.\"", ".", "format", "(", "query", "=", "query", ",", "nmatches", "=", "len", "(", "targets", ")", ")", ")", "target", "=", "targets", "[", "0", "]", "if", "account", ":", "if", "not", "target", ".", "access", "(", "account", ",", "target", ",", "'control'", ")", ":", "raise", "ValueError", "(", "\"$obj: Obj {target}(#{dbref} cannot be added - \"", "\"Account {account} does not have 'control' access.\"", ".", "format", "(", "target", "=", "target", ".", "key", ",", "dbref", "=", "target", ".", "id", ",", "account", "=", "account", ")", ")", "return", "target" ]
[ 272, 0 ]
[ 308, 21 ]
python
en
['en', 'en', 'en']
True
obj
(*args, **kwargs)
Usage $obj(<query>) Returns one Object searched globally by key, alias or #dbref. Error if more than one.
Usage $obj(<query>) Returns one Object searched globally by key, alias or #dbref. Error if more than one.
def obj(*args, **kwargs): """ Usage $obj(<query>) Returns one Object searched globally by key, alias or #dbref. Error if more than one. """ obj = _obj_search(return_list=False, *args, **kwargs) if obj: return "#{}".format(obj.id) return "".join(args)
[ "def", "obj", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "obj", "=", "_obj_search", "(", "return_list", "=", "False", ",", "*", "args", ",", "*", "*", "kwargs", ")", "if", "obj", ":", "return", "\"#{}\"", ".", "format", "(", "obj", ".", "id", ")", "return", "\"\"", ".", "join", "(", "args", ")" ]
[ 311, 0 ]
[ 320, 24 ]
python
en
['en', 'error', 'th']
False
objlist
(*args, **kwargs)
Usage $objlist(<query>) Returns list with one or more Objects searched globally by key, alias or #dbref.
Usage $objlist(<query>) Returns list with one or more Objects searched globally by key, alias or #dbref.
def objlist(*args, **kwargs): """ Usage $objlist(<query>) Returns list with one or more Objects searched globally by key, alias or #dbref. """ return ["#{}".format(obj.id) for obj in _obj_search(return_list=True, *args, **kwargs)]
[ "def", "objlist", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "[", "\"#{}\"", ".", "format", "(", "obj", ".", "id", ")", "for", "obj", "in", "_obj_search", "(", "return_list", "=", "True", ",", "*", "args", ",", "*", "*", "kwargs", ")", "]" ]
[ 323, 0 ]
[ 329, 91 ]
python
en
['en', 'error', 'th']
False
dbref
(*args, **kwargs)
Usage $dbref(<#dbref>) Returns one Object searched globally by #dbref. Error if #dbref is invalid.
Usage $dbref(<#dbref>) Returns one Object searched globally by #dbref. Error if #dbref is invalid.
def dbref(*args, **kwargs): """ Usage $dbref(<#dbref>) Returns one Object searched globally by #dbref. Error if #dbref is invalid. """ if not args or len(args) < 1 or _RE_DBREF.match(args[0]) is None: raise ValueError('$dbref requires a valid #dbref argument.') return obj(args[0])
[ "def", "dbref", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "args", "or", "len", "(", "args", ")", "<", "1", "or", "_RE_DBREF", ".", "match", "(", "args", "[", "0", "]", ")", "is", "None", ":", "raise", "ValueError", "(", "'$dbref requires a valid #dbref argument.'", ")", "return", "obj", "(", "args", "[", "0", "]", ")" ]
[ 332, 0 ]
[ 340, 23 ]
python
en
['en', 'error', 'th']
False
Contour.color
(self)
Sets the color of the contour lines. The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
Sets the color of the contour lines. The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
def color(self): """ Sets the color of the contour lines. The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["color"]
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 65, 28 ]
python
en
['en', 'error', 'th']
False
Contour.show
(self)
Sets whether or not dynamic contours are shown on hover The 'show' property must be specified as a bool (either True, or False) Returns ------- bool
Sets whether or not dynamic contours are shown on hover The 'show' property must be specified as a bool (either True, or False)
def show(self): """ Sets whether or not dynamic contours are shown on hover The 'show' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["show"]
[ "def", "show", "(", "self", ")", ":", "return", "self", "[", "\"show\"", "]" ]
[ 74, 4 ]
[ 85, 27 ]
python
en
['en', 'error', 'th']
False
Contour.width
(self)
Sets the width of the contour lines. The 'width' property is a number and may be specified as: - An int or float in the interval [1, 16] Returns ------- int|float
Sets the width of the contour lines. The 'width' property is a number and may be specified as: - An int or float in the interval [1, 16]
def width(self): """ Sets the width of the contour lines. The 'width' property is a number and may be specified as: - An int or float in the interval [1, 16] Returns ------- int|float """ return self["width"]
[ "def", "width", "(", "self", ")", ":", "return", "self", "[", "\"width\"", "]" ]
[ 94, 4 ]
[ 105, 28 ]
python
en
['en', 'error', 'th']
False
Contour.__init__
(self, arg=None, color=None, show=None, width=None, **kwargs)
Construct a new Contour object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.volume.Contour` color Sets the color of the contour lines. show Sets whether or not dynamic contours are shown on hover width Sets the width of the contour lines. Returns ------- Contour
Construct a new Contour object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.volume.Contour` color Sets the color of the contour lines. show Sets whether or not dynamic contours are shown on hover width Sets the width of the contour lines.
def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): """ Construct a new Contour object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.volume.Contour` color Sets the color of the contour lines. show Sets whether or not dynamic contours are shown on hover width Sets the width of the contour lines. Returns ------- Contour """ super(Contour, self).__init__("contour") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.volume.Contour constructor must be a dict or an instance of :class:`plotly.graph_objs.volume.Contour`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("color", None) _v = color if color is not None else _v if _v is not None: self["color"] = _v _v = arg.pop("show", None) _v = show if show is not None else _v if _v is not None: self["show"] = _v _v = arg.pop("width", None) _v = width if width is not None else _v if _v is not None: self["width"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "show", "=", "None", ",", "width", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Contour", ",", "self", ")", ".", "__init__", "(", "\"contour\"", ")", "if", "\"_parent\"", "in", "kwargs", ":", "self", ".", "_parent", "=", "kwargs", "[", "\"_parent\"", "]", "return", "# Validate arg", "# ------------", "if", "arg", "is", "None", ":", "arg", "=", "{", "}", "elif", "isinstance", "(", "arg", ",", "self", ".", "__class__", ")", ":", "arg", "=", "arg", ".", "to_plotly_json", "(", ")", "elif", "isinstance", "(", "arg", ",", "dict", ")", ":", "arg", "=", "_copy", ".", "copy", "(", "arg", ")", "else", ":", "raise", "ValueError", "(", "\"\"\"\\\nThe first argument to the plotly.graph_objs.volume.Contour \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.volume.Contour`\"\"\"", ")", "# Handle skip_invalid", "# -------------------", "self", ".", "_skip_invalid", "=", "kwargs", ".", "pop", "(", "\"skip_invalid\"", ",", "False", ")", "self", ".", "_validate", "=", "kwargs", ".", "pop", "(", "\"_validate\"", ",", "True", ")", "# Populate data dict with properties", "# ----------------------------------", "_v", "=", "arg", ".", "pop", "(", "\"color\"", ",", "None", ")", "_v", "=", "color", "if", "color", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"color\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"show\"", ",", "None", ")", "_v", "=", "show", "if", "show", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"show\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"width\"", ",", "None", ")", "_v", "=", "width", "if", "width", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"width\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 124, 4 ]
[ 193, 34 ]
python
en
['en', 'error', 'th']
False
Textfont.color
(self)
Sets the text font color of unselected points, applied only when a selection exists. The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
Sets the text font color of unselected points, applied only when a selection exists. The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
def color(self): """ Sets the text font color of unselected points, applied only when a selection exists. The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["color"]
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 66, 28 ]
python
en
['en', 'error', 'th']
False
Textfont.__init__
(self, arg=None, color=None, **kwargs)
Construct a new Textfont object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattercarpet. unselected.Textfont` color Sets the text font color of unselected points, applied only when a selection exists. Returns ------- Textfont
Construct a new Textfont object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattercarpet. unselected.Textfont` color Sets the text font color of unselected points, applied only when a selection exists.
def __init__(self, arg=None, color=None, **kwargs): """ Construct a new Textfont object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattercarpet. unselected.Textfont` color Sets the text font color of unselected points, applied only when a selection exists. Returns ------- Textfont """ super(Textfont, self).__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.scattercarpet.unselected.Textfont constructor must be a dict or an instance of :class:`plotly.graph_objs.scattercarpet.unselected.Textfont`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("color", None) _v = color if color is not None else _v if _v is not None: self["color"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Textfont", ",", "self", ")", ".", "__init__", "(", "\"textfont\"", ")", "if", "\"_parent\"", "in", "kwargs", ":", "self", ".", "_parent", "=", "kwargs", "[", "\"_parent\"", "]", "return", "# Validate arg", "# ------------", "if", "arg", "is", "None", ":", "arg", "=", "{", "}", "elif", "isinstance", "(", "arg", ",", "self", ".", "__class__", ")", ":", "arg", "=", "arg", ".", "to_plotly_json", "(", ")", "elif", "isinstance", "(", "arg", ",", "dict", ")", ":", "arg", "=", "_copy", ".", "copy", "(", "arg", ")", "else", ":", "raise", "ValueError", "(", "\"\"\"\\\nThe first argument to the plotly.graph_objs.scattercarpet.unselected.Textfont \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.scattercarpet.unselected.Textfont`\"\"\"", ")", "# Handle skip_invalid", "# -------------------", "self", ".", "_skip_invalid", "=", "kwargs", ".", "pop", "(", "\"skip_invalid\"", ",", "False", ")", "self", ".", "_validate", "=", "kwargs", ".", "pop", "(", "\"_validate\"", ",", "True", ")", "# Populate data dict with properties", "# ----------------------------------", "_v", "=", "arg", ".", "pop", "(", "\"color\"", ",", "None", ")", "_v", "=", "color", "if", "color", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"color\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 82, 4 ]
[ 140, 34 ]
python
en
['en', 'error', 'th']
False
TestCase.assertAllEqual
(self, a, b)
Asserts that two numpy arrays have the same values. Args: a: the expected numpy ndarray or anything can be converted to one. b: the actual numpy ndarray or anything can be converted to one.
Asserts that two numpy arrays have the same values.
def assertAllEqual(self, a, b): """Asserts that two numpy arrays have the same values. Args: a: the expected numpy ndarray or anything can be converted to one. b: the actual numpy ndarray or anything can be converted to one. """ a = self._GetNdArray(a) b = self._GetNdArray(b) self.assertEqual( a.shape, b.shape, 'Shape mismatch: expected %s, got %s.' % (a.shape, b.shape)) same = (a == b) if a.dtype == np.float32 or a.dtype == np.float64: same = np.logical_or(same, np.logical_and(np.isnan(a), np.isnan(b))) if not np.all(same): # Prints more details than np.testing.assert_array_equal. diff = np.logical_not(same) if a.ndim: x = a[np.where(diff)] y = b[np.where(diff)] print('not equal where = ', np.where(diff)) else: # np.where is broken for scalars x, y = a, b print('not equal lhs = ', x) print('not equal rhs = ', y) np.testing.assert_array_equal(a, b)
[ "def", "assertAllEqual", "(", "self", ",", "a", ",", "b", ")", ":", "a", "=", "self", ".", "_GetNdArray", "(", "a", ")", "b", "=", "self", ".", "_GetNdArray", "(", "b", ")", "self", ".", "assertEqual", "(", "a", ".", "shape", ",", "b", ".", "shape", ",", "'Shape mismatch: expected %s, got %s.'", "%", "(", "a", ".", "shape", ",", "b", ".", "shape", ")", ")", "same", "=", "(", "a", "==", "b", ")", "if", "a", ".", "dtype", "==", "np", ".", "float32", "or", "a", ".", "dtype", "==", "np", ".", "float64", ":", "same", "=", "np", ".", "logical_or", "(", "same", ",", "np", ".", "logical_and", "(", "np", ".", "isnan", "(", "a", ")", ",", "np", ".", "isnan", "(", "b", ")", ")", ")", "if", "not", "np", ".", "all", "(", "same", ")", ":", "# Prints more details than np.testing.assert_array_equal.", "diff", "=", "np", ".", "logical_not", "(", "same", ")", "if", "a", ".", "ndim", ":", "x", "=", "a", "[", "np", ".", "where", "(", "diff", ")", "]", "y", "=", "b", "[", "np", ".", "where", "(", "diff", ")", "]", "print", "(", "'not equal where = '", ",", "np", ".", "where", "(", "diff", ")", ")", "else", ":", "# np.where is broken for scalars", "x", ",", "y", "=", "a", ",", "b", "print", "(", "'not equal lhs = '", ",", "x", ")", "print", "(", "'not equal rhs = '", ",", "y", ")", "np", ".", "testing", ".", "assert_array_equal", "(", "a", ",", "b", ")" ]
[ 24, 4 ]
[ 53, 47 ]
python
en
['en', 'en', 'en']
True
TestCase.assertAllClose
(self, a, b, rtol=1e-6, atol=1e-6)
Asserts that two numpy arrays, or dicts of same, have near values. This does not support nested dicts. Args: a: The expected numpy ndarray (or anything can be converted to one), or dict of same. Must be a dict iff `b` is a dict. b: The actual numpy ndarray (or anything can be converted to one), or dict of same. Must be a dict iff `a` is a dict. rtol: relative tolerance. atol: absolute tolerance. Raises: ValueError: if only one of `a` and `b` is a dict.
Asserts that two numpy arrays, or dicts of same, have near values.
def assertAllClose(self, a, b, rtol=1e-6, atol=1e-6): """Asserts that two numpy arrays, or dicts of same, have near values. This does not support nested dicts. Args: a: The expected numpy ndarray (or anything can be converted to one), or dict of same. Must be a dict iff `b` is a dict. b: The actual numpy ndarray (or anything can be converted to one), or dict of same. Must be a dict iff `a` is a dict. rtol: relative tolerance. atol: absolute tolerance. Raises: ValueError: if only one of `a` and `b` is a dict. """ is_a_dict = isinstance(a, dict) if is_a_dict != isinstance(b, dict): raise ValueError("Can't compare dict to non-dict, %s vs %s." % (a, b)) if is_a_dict: self.assertCountEqual( a.keys(), b.keys(), msg='mismatched keys, expected %s, got %s' % (a.keys(), b.keys())) for k in a: self._assertArrayLikeAllClose( a[k], b[k], rtol=rtol, atol=atol, msg='%s: expected %s, got %s.' % (k, a, b)) else: self._assertArrayLikeAllClose(a, b, rtol=rtol, atol=atol)
[ "def", "assertAllClose", "(", "self", ",", "a", ",", "b", ",", "rtol", "=", "1e-6", ",", "atol", "=", "1e-6", ")", ":", "is_a_dict", "=", "isinstance", "(", "a", ",", "dict", ")", "if", "is_a_dict", "!=", "isinstance", "(", "b", ",", "dict", ")", ":", "raise", "ValueError", "(", "\"Can't compare dict to non-dict, %s vs %s.\"", "%", "(", "a", ",", "b", ")", ")", "if", "is_a_dict", ":", "self", ".", "assertCountEqual", "(", "a", ".", "keys", "(", ")", ",", "b", ".", "keys", "(", ")", ",", "msg", "=", "'mismatched keys, expected %s, got %s'", "%", "(", "a", ".", "keys", "(", ")", ",", "b", ".", "keys", "(", ")", ")", ")", "for", "k", "in", "a", ":", "self", ".", "_assertArrayLikeAllClose", "(", "a", "[", "k", "]", ",", "b", "[", "k", "]", ",", "rtol", "=", "rtol", ",", "atol", "=", "atol", ",", "msg", "=", "'%s: expected %s, got %s.'", "%", "(", "k", ",", "a", ",", "b", ")", ")", "else", ":", "self", ".", "_assertArrayLikeAllClose", "(", "a", ",", "b", ",", "rtol", "=", "rtol", ",", "atol", "=", "atol", ")" ]
[ 55, 4 ]
[ 87, 69 ]
python
en
['en', 'en', 'en']
True
TestPresentationAck.test_init
(self)
Test initializer.
Test initializer.
def test_init(self): """Test initializer.""" pres_ack = PresentationAck() assert pres_ack.status == "OK"
[ "def", "test_init", "(", "self", ")", ":", "pres_ack", "=", "PresentationAck", "(", ")", "assert", "pres_ack", ".", "status", "==", "\"OK\"" ]
[ 12, 4 ]
[ 15, 38 ]
python
de
['de', 'pl', 'en']
False
TestPresentationAck.test_deserialize
(self)
Test deserialization.
Test deserialization.
def test_deserialize(self): """Test deserialization.""" dump = json.dumps({ "@type": PRESENTATION_ACK, "status": "OK" }) pres_ack = PresentationAck.deserialize(dump) assert type(pres_ack) == PresentationAck
[ "def", "test_deserialize", "(", "self", ")", ":", "dump", "=", "json", ".", "dumps", "(", "{", "\"@type\"", ":", "PRESENTATION_ACK", ",", "\"status\"", ":", "\"OK\"", "}", ")", "pres_ack", "=", "PresentationAck", ".", "deserialize", "(", "dump", ")", "assert", "type", "(", "pres_ack", ")", "==", "PresentationAck" ]
[ 22, 4 ]
[ 30, 48 ]
python
de
['ro', 'de', 'en']
False
TestPresentationAck.test_serialize
(self)
Test serialization.
Test serialization.
def test_serialize(self): """Test serialization.""" pres_ack_dict = PresentationAck().serialize() pres_ack_dict.pop("@id") assert pres_ack_dict == { "@type": PRESENTATION_ACK, "status": "OK" }
[ "def", "test_serialize", "(", "self", ")", ":", "pres_ack_dict", "=", "PresentationAck", "(", ")", ".", "serialize", "(", ")", "pres_ack_dict", ".", "pop", "(", "\"@id\"", ")", "assert", "pres_ack_dict", "==", "{", "\"@type\"", ":", "PRESENTATION_ACK", ",", "\"status\"", ":", "\"OK\"", "}" ]
[ 32, 4 ]
[ 40, 9 ]
python
en
['en', 'fy', 'en']
False
TestPresentationAckSchema.test_make_model
(self)
Test making model.
Test making model.
def test_make_model(self): """Test making model.""" pres_ack_dict = PresentationAck().serialize() ''' Looks like: { "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/present-proof/1.0/ack", "@id": "f49773e3-bd56-4868-a5f1-456d1e6d1a16", "status": "OK" } ''' model_instance = PresentationAck.deserialize(pres_ack_dict) assert isinstance(model_instance, PresentationAck)
[ "def", "test_make_model", "(", "self", ")", ":", "pres_ack_dict", "=", "PresentationAck", "(", ")", ".", "serialize", "(", ")", "'''\n Looks like: {\n \"@type\": \"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/present-proof/1.0/ack\",\n \"@id\": \"f49773e3-bd56-4868-a5f1-456d1e6d1a16\",\n \"status\": \"OK\"\n }\n '''", "model_instance", "=", "PresentationAck", ".", "deserialize", "(", "pres_ack_dict", ")", "assert", "isinstance", "(", "model_instance", ",", "PresentationAck", ")" ]
[ 46, 4 ]
[ 58, 58 ]
python
en
['en', 'no', 'en']
True
Tickformatstop.dtickrange
(self)
range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" The 'dtickrange' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'dtickrange[0]' property accepts values of any type (1) The 'dtickrange[1]' property accepts values of any type Returns ------- list
range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" The 'dtickrange' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'dtickrange[0]' property accepts values of any type (1) The 'dtickrange[1]' property accepts values of any type
def dtickrange(self): """ range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" The 'dtickrange' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The 'dtickrange[0]' property accepts values of any type (1) The 'dtickrange[1]' property accepts values of any type Returns ------- list """ return self["dtickrange"]
[ "def", "dtickrange", "(", "self", ")", ":", "return", "self", "[", "\"dtickrange\"", "]" ]
[ 15, 4 ]
[ 31, 33 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.enabled
(self)
Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. The 'enabled' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. The 'enabled' property must be specified as a bool (either True, or False)
def enabled(self): """ Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. The 'enabled' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["enabled"]
[ "def", "enabled", "(", "self", ")", ":", "return", "self", "[", "\"enabled\"", "]" ]
[ 40, 4 ]
[ 52, 30 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.name
(self)
When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string
def name(self): """ When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["name"]
[ "def", "name", "(", "self", ")", ":", "return", "self", "[", "\"name\"", "]" ]
[ 61, 4 ]
[ 79, 27 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.templateitemname
(self)
Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. The 'templateitemname' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. The 'templateitemname' property is a string and must be specified as: - A string - A number that will be converted to a string
def templateitemname(self): """ Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. The 'templateitemname' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["templateitemname"]
[ "def", "templateitemname", "(", "self", ")", ":", "return", "self", "[", "\"templateitemname\"", "]" ]
[ 88, 4 ]
[ 107, 39 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.value
(self)
string - dtickformat for described zoom level, the same as "tickformat" The 'value' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
string - dtickformat for described zoom level, the same as "tickformat" The 'value' property is a string and must be specified as: - A string - A number that will be converted to a string
def value(self): """ string - dtickformat for described zoom level, the same as "tickformat" The 'value' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["value"]
[ "def", "value", "(", "self", ")", ":", "return", "self", "[", "\"value\"", "]" ]
[ 116, 4 ]
[ 129, 28 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.__init__
( self, arg=None, dtickrange=None, enabled=None, name=None, templateitemname=None, value=None, **kwargs )
Construct a new Tickformatstop object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatterpolar.m arker.colorbar.Tickformatstop` dtickrange range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" enabled Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. name When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. templateitemname Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. value string - dtickformat for described zoom level, the same as "tickformat" Returns ------- Tickformatstop
Construct a new Tickformatstop object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatterpolar.m arker.colorbar.Tickformatstop` dtickrange range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" enabled Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. name When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. templateitemname Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. value string - dtickformat for described zoom level, the same as "tickformat"
def __init__( self, arg=None, dtickrange=None, enabled=None, name=None, templateitemname=None, value=None, **kwargs ): """ Construct a new Tickformatstop object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatterpolar.m arker.colorbar.Tickformatstop` dtickrange range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" enabled Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. name When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. templateitemname Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. value string - dtickformat for described zoom level, the same as "tickformat" Returns ------- Tickformatstop """ super(Tickformatstop, self).__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop constructor must be a dict or an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("dtickrange", None) _v = dtickrange if dtickrange is not None else _v if _v is not None: self["dtickrange"] = _v _v = arg.pop("enabled", None) _v = enabled if enabled is not None else _v if _v is not None: self["enabled"] = _v _v = arg.pop("name", None) _v = name if name is not None else _v if _v is not None: self["name"] = _v _v = arg.pop("templateitemname", None) _v = templateitemname if templateitemname is not None else _v if _v is not None: self["templateitemname"] = _v _v = arg.pop("value", None) _v = value if value is not None else _v if _v is not None: self["value"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "dtickrange", "=", "None", ",", "enabled", "=", "None", ",", "name", "=", "None", ",", "templateitemname", "=", "None", ",", "value", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Tickformatstop", ",", "self", ")", ".", "__init__", "(", "\"tickformatstops\"", ")", "if", "\"_parent\"", "in", "kwargs", ":", "self", ".", "_parent", "=", "kwargs", "[", "\"_parent\"", "]", "return", "# Validate arg", "# ------------", "if", "arg", "is", "None", ":", "arg", "=", "{", "}", "elif", "isinstance", "(", "arg", ",", "self", ".", "__class__", ")", ":", "arg", "=", "arg", ".", "to_plotly_json", "(", ")", "elif", "isinstance", "(", "arg", ",", "dict", ")", ":", "arg", "=", "_copy", ".", "copy", "(", "arg", ")", "else", ":", "raise", "ValueError", "(", "\"\"\"\\\nThe first argument to the plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop`\"\"\"", ")", "# Handle skip_invalid", "# -------------------", "self", ".", "_skip_invalid", "=", "kwargs", ".", "pop", "(", "\"skip_invalid\"", ",", "False", ")", "self", ".", "_validate", "=", "kwargs", ".", "pop", "(", "\"_validate\"", ",", "True", ")", "# Populate data dict with properties", "# ----------------------------------", "_v", "=", "arg", ".", "pop", "(", "\"dtickrange\"", ",", "None", ")", "_v", "=", "dtickrange", "if", "dtickrange", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"dtickrange\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"enabled\"", ",", "None", ")", "_v", "=", "enabled", "if", "enabled", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"enabled\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"name\"", ",", "None", ")", "_v", "=", "name", "if", "name", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"name\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"templateitemname\"", ",", "None", ")", "_v", "=", "templateitemname", "if", "templateitemname", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"templateitemname\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"value\"", ",", "None", ")", "_v", "=", "value", "if", "value", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"value\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 172, 4 ]
[ 282, 34 ]
python
en
['en', 'error', 'th']
False
Font.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen - A list or array of any of the above Returns ------- str|numpy.ndarray
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen - A list or array of any of the above
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen - A list or array of any of the above Returns ------- str|numpy.ndarray """ return self["color"]
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 64, 28 ]
python
en
['en', 'error', 'th']
False
Font.colorsrc
(self)
Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def colorsrc(self): """ Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["colorsrc"]
[ "def", "colorsrc", "(", "self", ")", ":", "return", "self", "[", "\"colorsrc\"", "]" ]
[ 73, 4 ]
[ 84, 31 ]
python
en
['en', 'error', 'th']
False
Font.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". The 'family' property is a string and must be specified as: - A non-empty string - A tuple, list, or one-dimensional numpy array of the above Returns ------- str|numpy.ndarray
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". The 'family' property is a string and must be specified as: - A non-empty string - A tuple, list, or one-dimensional numpy array of the above
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". The 'family' property is a string and must be specified as: - A non-empty string - A tuple, list, or one-dimensional numpy array of the above Returns ------- str|numpy.ndarray """ return self["family"]
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 93, 4 ]
[ 116, 29 ]
python
en
['en', 'error', 'th']
False
Font.familysrc
(self)
Sets the source reference on Chart Studio Cloud for family . The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for family . The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def familysrc(self): """ Sets the source reference on Chart Studio Cloud for family . The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["familysrc"]
[ "def", "familysrc", "(", "self", ")", ":", "return", "self", "[", "\"familysrc\"", "]" ]
[ 125, 4 ]
[ 136, 32 ]
python
en
['en', 'error', 'th']
False
Font.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.ndarray
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] - A tuple, list, or one-dimensional numpy array of the above
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.ndarray """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 145, 4 ]
[ 155, 27 ]
python
en
['en', 'error', 'th']
False
Font.sizesrc
(self)
Sets the source reference on Chart Studio Cloud for size . The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for size . The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object
def sizesrc(self): """ Sets the source reference on Chart Studio Cloud for size . The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["sizesrc"]
[ "def", "sizesrc", "(", "self", ")", ":", "return", "self", "[", "\"sizesrc\"", "]" ]
[ 164, 4 ]
[ 175, 30 ]
python
en
['en', 'error', 'th']
False
Font.__init__
( self, arg=None, color=None, colorsrc=None, family=None, familysrc=None, size=None, sizesrc=None, **kwargs )
Construct a new Font object Sets the font used in hover labels. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font` color colorsrc Sets the source reference on Chart Studio Cloud for color . family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on- premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". familysrc Sets the source reference on Chart Studio Cloud for family . size sizesrc Sets the source reference on Chart Studio Cloud for size . Returns ------- Font
Construct a new Font object Sets the font used in hover labels.
def __init__( self, arg=None, color=None, colorsrc=None, family=None, familysrc=None, size=None, sizesrc=None, **kwargs ): """ Construct a new Font object Sets the font used in hover labels. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font` color colorsrc Sets the source reference on Chart Studio Cloud for color . family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on- premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". familysrc Sets the source reference on Chart Studio Cloud for family . size sizesrc Sets the source reference on Chart Studio Cloud for size . Returns ------- Font """ super(Font, self).__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return # Validate arg # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError( """\ The first argument to the plotly.graph_objs.choropleth.hoverlabel.Font constructor must be a dict or an instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font`""" ) # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) # Populate data dict with properties # ---------------------------------- _v = arg.pop("color", None) _v = color if color is not None else _v if _v is not None: self["color"] = _v _v = arg.pop("colorsrc", None) _v = colorsrc if colorsrc is not None else _v if _v is not None: self["colorsrc"] = _v _v = arg.pop("family", None) _v = family if family is not None else _v if _v is not None: self["family"] = _v _v = arg.pop("familysrc", None) _v = familysrc if familysrc is not None else _v if _v is not None: self["familysrc"] = _v _v = arg.pop("size", None) _v = size if size is not None else _v if _v is not None: self["size"] = _v _v = arg.pop("sizesrc", None) _v = sizesrc if sizesrc is not None else _v if _v is not None: self["sizesrc"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "colorsrc", "=", "None", ",", "family", "=", "None", ",", "familysrc", "=", "None", ",", "size", "=", "None", ",", "sizesrc", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Font", ",", "self", ")", ".", "__init__", "(", "\"font\"", ")", "if", "\"_parent\"", "in", "kwargs", ":", "self", ".", "_parent", "=", "kwargs", "[", "\"_parent\"", "]", "return", "# Validate arg", "# ------------", "if", "arg", "is", "None", ":", "arg", "=", "{", "}", "elif", "isinstance", "(", "arg", ",", "self", ".", "__class__", ")", ":", "arg", "=", "arg", ".", "to_plotly_json", "(", ")", "elif", "isinstance", "(", "arg", ",", "dict", ")", ":", "arg", "=", "_copy", ".", "copy", "(", "arg", ")", "else", ":", "raise", "ValueError", "(", "\"\"\"\\\nThe first argument to the plotly.graph_objs.choropleth.hoverlabel.Font \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font`\"\"\"", ")", "# Handle skip_invalid", "# -------------------", "self", ".", "_skip_invalid", "=", "kwargs", ".", "pop", "(", "\"skip_invalid\"", ",", "False", ")", "self", ".", "_validate", "=", "kwargs", ".", "pop", "(", "\"_validate\"", ",", "True", ")", "# Populate data dict with properties", "# ----------------------------------", "_v", "=", "arg", ".", "pop", "(", "\"color\"", ",", "None", ")", "_v", "=", "color", "if", "color", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"color\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"colorsrc\"", ",", "None", ")", "_v", "=", "colorsrc", "if", "colorsrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"colorsrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"family\"", ",", "None", ")", "_v", "=", "family", "if", "family", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"family\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"familysrc\"", ",", "None", ")", "_v", "=", "familysrc", "if", "familysrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"familysrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"size\"", ",", "None", ")", "_v", "=", "size", "if", "size", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"size\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"sizesrc\"", ",", "None", ")", "_v", "=", "sizesrc", "if", "sizesrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"sizesrc\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 215, 4 ]
[ 329, 34 ]
python
en
['en', 'error', 'th']
False
cross_entropy
(pred, label, weight=None, reduction='mean', avg_factor=None, class_weight=None)
Calculate the CrossEntropy loss. Args: pred (torch.Tensor): The prediction with shape (N, C), C is the number of classes. label (torch.Tensor): The learning label of the prediction. weight (torch.Tensor, optional): Sample-wise loss weight. reduction (str, optional): The method used to reduce the loss. avg_factor (int, optional): Average factor that is used to average the loss. Defaults to None. class_weight (list[float], optional): The weight for each class. Returns: torch.Tensor: The calculated loss
Calculate the CrossEntropy loss.
def cross_entropy(pred, label, weight=None, reduction='mean', avg_factor=None, class_weight=None): """Calculate the CrossEntropy loss. Args: pred (torch.Tensor): The prediction with shape (N, C), C is the number of classes. label (torch.Tensor): The learning label of the prediction. weight (torch.Tensor, optional): Sample-wise loss weight. reduction (str, optional): The method used to reduce the loss. avg_factor (int, optional): Average factor that is used to average the loss. Defaults to None. class_weight (list[float], optional): The weight for each class. Returns: torch.Tensor: The calculated loss """ # element-wise losses loss = F.cross_entropy(pred, label, weight=class_weight, reduction='none') # apply weights and do the reduction if weight is not None: weight = weight.float() loss = weight_reduce_loss( loss, weight=weight, reduction=reduction, avg_factor=avg_factor) return loss
[ "def", "cross_entropy", "(", "pred", ",", "label", ",", "weight", "=", "None", ",", "reduction", "=", "'mean'", ",", "avg_factor", "=", "None", ",", "class_weight", "=", "None", ")", ":", "# element-wise losses", "loss", "=", "F", ".", "cross_entropy", "(", "pred", ",", "label", ",", "weight", "=", "class_weight", ",", "reduction", "=", "'none'", ")", "# apply weights and do the reduction", "if", "weight", "is", "not", "None", ":", "weight", "=", "weight", ".", "float", "(", ")", "loss", "=", "weight_reduce_loss", "(", "loss", ",", "weight", "=", "weight", ",", "reduction", "=", "reduction", ",", "avg_factor", "=", "avg_factor", ")", "return", "loss" ]
[ 8, 0 ]
[ 38, 15 ]
python
en
['en', 'it', 'en']
True
binary_cross_entropy
(pred, label, weight=None, reduction='mean', avg_factor=None, class_weight=None)
Calculate the binary CrossEntropy loss. Args: pred (torch.Tensor): The prediction with shape (N, 1). label (torch.Tensor): The learning label of the prediction. weight (torch.Tensor, optional): Sample-wise loss weight. reduction (str, optional): The method used to reduce the loss. Options are "none", "mean" and "sum". avg_factor (int, optional): Average factor that is used to average the loss. Defaults to None. class_weight (list[float], optional): The weight for each class. Returns: torch.Tensor: The calculated loss
Calculate the binary CrossEntropy loss.
def binary_cross_entropy(pred, label, weight=None, reduction='mean', avg_factor=None, class_weight=None): """Calculate the binary CrossEntropy loss. Args: pred (torch.Tensor): The prediction with shape (N, 1). label (torch.Tensor): The learning label of the prediction. weight (torch.Tensor, optional): Sample-wise loss weight. reduction (str, optional): The method used to reduce the loss. Options are "none", "mean" and "sum". avg_factor (int, optional): Average factor that is used to average the loss. Defaults to None. class_weight (list[float], optional): The weight for each class. Returns: torch.Tensor: The calculated loss """ if pred.dim() != label.dim(): label, weight = _expand_binary_labels(label, weight, pred.size(-1)) # weighted element-wise losses if weight is not None: weight = weight.float() loss = F.binary_cross_entropy_with_logits( pred, label.float(), weight=class_weight, reduction='none') # do the reduction for the weighted loss loss = weight_reduce_loss( loss, weight, reduction=reduction, avg_factor=avg_factor) return loss
[ "def", "binary_cross_entropy", "(", "pred", ",", "label", ",", "weight", "=", "None", ",", "reduction", "=", "'mean'", ",", "avg_factor", "=", "None", ",", "class_weight", "=", "None", ")", ":", "if", "pred", ".", "dim", "(", ")", "!=", "label", ".", "dim", "(", ")", ":", "label", ",", "weight", "=", "_expand_binary_labels", "(", "label", ",", "weight", ",", "pred", ".", "size", "(", "-", "1", ")", ")", "# weighted element-wise losses", "if", "weight", "is", "not", "None", ":", "weight", "=", "weight", ".", "float", "(", ")", "loss", "=", "F", ".", "binary_cross_entropy_with_logits", "(", "pred", ",", "label", ".", "float", "(", ")", ",", "weight", "=", "class_weight", ",", "reduction", "=", "'none'", ")", "# do the reduction for the weighted loss", "loss", "=", "weight_reduce_loss", "(", "loss", ",", "weight", ",", "reduction", "=", "reduction", ",", "avg_factor", "=", "avg_factor", ")", "return", "loss" ]
[ 57, 0 ]
[ 90, 15 ]
python
en
['en', 'it', 'en']
True
mask_cross_entropy
(pred, target, label, reduction='mean', avg_factor=None, class_weight=None)
Calculate the CrossEntropy loss for masks. Args: pred (torch.Tensor): The prediction with shape (N, C), C is the number of classes. target (torch.Tensor): The learning label of the prediction. label (torch.Tensor): ``label`` indicates the class label of the mask' corresponding object. This will be used to select the mask in the of the class which the object belongs to when the mask prediction if not class-agnostic. reduction (str, optional): The method used to reduce the loss. Options are "none", "mean" and "sum". avg_factor (int, optional): Average factor that is used to average the loss. Defaults to None. class_weight (list[float], optional): The weight for each class. Returns: torch.Tensor: The calculated loss
Calculate the CrossEntropy loss for masks.
def mask_cross_entropy(pred, target, label, reduction='mean', avg_factor=None, class_weight=None): """Calculate the CrossEntropy loss for masks. Args: pred (torch.Tensor): The prediction with shape (N, C), C is the number of classes. target (torch.Tensor): The learning label of the prediction. label (torch.Tensor): ``label`` indicates the class label of the mask' corresponding object. This will be used to select the mask in the of the class which the object belongs to when the mask prediction if not class-agnostic. reduction (str, optional): The method used to reduce the loss. Options are "none", "mean" and "sum". avg_factor (int, optional): Average factor that is used to average the loss. Defaults to None. class_weight (list[float], optional): The weight for each class. Returns: torch.Tensor: The calculated loss """ # TODO: handle these two reserved arguments assert reduction == 'mean' and avg_factor is None num_rois = pred.size()[0] inds = torch.arange(0, num_rois, dtype=torch.long, device=pred.device) pred_slice = pred[inds, label].squeeze(1) return F.binary_cross_entropy_with_logits( pred_slice, target, weight=class_weight, reduction='mean')[None]
[ "def", "mask_cross_entropy", "(", "pred", ",", "target", ",", "label", ",", "reduction", "=", "'mean'", ",", "avg_factor", "=", "None", ",", "class_weight", "=", "None", ")", ":", "# TODO: handle these two reserved arguments", "assert", "reduction", "==", "'mean'", "and", "avg_factor", "is", "None", "num_rois", "=", "pred", ".", "size", "(", ")", "[", "0", "]", "inds", "=", "torch", ".", "arange", "(", "0", ",", "num_rois", ",", "dtype", "=", "torch", ".", "long", ",", "device", "=", "pred", ".", "device", ")", "pred_slice", "=", "pred", "[", "inds", ",", "label", "]", ".", "squeeze", "(", "1", ")", "return", "F", ".", "binary_cross_entropy_with_logits", "(", "pred_slice", ",", "target", ",", "weight", "=", "class_weight", ",", "reduction", "=", "'mean'", ")", "[", "None", "]" ]
[ 93, 0 ]
[ 124, 72 ]
python
en
['en', 'en', 'en']
True
start_plugin_services
(server)
This hook is called by Evennia, last in the Server startup process. server - a reference to the main server application.
This hook is called by Evennia, last in the Server startup process.
def start_plugin_services(server): """ This hook is called by Evennia, last in the Server startup process. server - a reference to the main server application. """ pass
[ "def", "start_plugin_services", "(", "server", ")", ":", "pass" ]
[ 17, 0 ]
[ 23, 8 ]
python
en
['en', 'error', 'th']
False
ColorBar.bgcolor
(self)
Sets the color of padded area. The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
Sets the color of padded area. The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
def bgcolor(self): """ Sets the color of padded area. The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["bgcolor"]
[ "def", "bgcolor", "(", "self", ")", ":", "return", "self", "[", "\"bgcolor\"", "]" ]
[ 59, 4 ]
[ 109, 30 ]
python
en
['en', 'error', 'th']
False
ColorBar.bordercolor
(self)
Sets the axis line color. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
Sets the axis line color. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
def bordercolor(self): """ Sets the axis line color. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["bordercolor"]
[ "def", "bordercolor", "(", "self", ")", ":", "return", "self", "[", "\"bordercolor\"", "]" ]
[ 118, 4 ]
[ 168, 34 ]
python
en
['en', 'error', 'th']
False
ColorBar.borderwidth
(self)
Sets the width (in px) or the border enclosing this color bar. The 'borderwidth' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the width (in px) or the border enclosing this color bar. The 'borderwidth' property is a number and may be specified as: - An int or float in the interval [0, inf]
def borderwidth(self): """ Sets the width (in px) or the border enclosing this color bar. The 'borderwidth' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["borderwidth"]
[ "def", "borderwidth", "(", "self", ")", ":", "return", "self", "[", "\"borderwidth\"", "]" ]
[ 177, 4 ]
[ 188, 34 ]
python
en
['en', 'error', 'th']
False
ColorBar.dtick
(self)
Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" The 'dtick' property accepts values of any type Returns ------- Any
Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" The 'dtick' property accepts values of any type
def dtick(self): """ Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L<f>", where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date", then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. "date" also has special values "M<n>" gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15" and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48" The 'dtick' property accepts values of any type Returns ------- Any """ return self["dtick"]
[ "def", "dtick", "(", "self", ")", ":", "return", "self", "[", "\"dtick\"", "]" ]
[ 197, 4 ]
[ 226, 28 ]
python
en
['en', 'error', 'th']
False
ColorBar.exponentformat
(self)
Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. The 'exponentformat' property is an enumeration that may be specified as: - One of the following enumeration values: ['none', 'e', 'E', 'power', 'SI', 'B'] Returns ------- Any
Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. The 'exponentformat' property is an enumeration that may be specified as: - One of the following enumeration values: ['none', 'e', 'E', 'power', 'SI', 'B']
def exponentformat(self): """ Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If "none", it appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If "B", 1B. The 'exponentformat' property is an enumeration that may be specified as: - One of the following enumeration values: ['none', 'e', 'E', 'power', 'SI', 'B'] Returns ------- Any """ return self["exponentformat"]
[ "def", "exponentformat", "(", "self", ")", ":", "return", "self", "[", "\"exponentformat\"", "]" ]
[ 235, 4 ]
[ 251, 37 ]
python
en
['en', 'error', 'th']
False
ColorBar.len
(self)
Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends. The 'len' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends. The 'len' property is a number and may be specified as: - An int or float in the interval [0, inf]
def len(self): """ Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends. The 'len' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["len"]
[ "def", "len", "(", "self", ")", ":", "return", "self", "[", "\"len\"", "]" ]
[ 260, 4 ]
[ 273, 26 ]
python
en
['en', 'error', 'th']
False
ColorBar.lenmode
(self)
Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot "fraction" or in *pixels. Use `len` to set the value. The 'lenmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['fraction', 'pixels'] Returns ------- Any
Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot "fraction" or in *pixels. Use `len` to set the value. The 'lenmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['fraction', 'pixels']
def lenmode(self): """ Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot "fraction" or in *pixels. Use `len` to set the value. The 'lenmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['fraction', 'pixels'] Returns ------- Any """ return self["lenmode"]
[ "def", "lenmode", "(", "self", ")", ":", "return", "self", "[", "\"lenmode\"", "]" ]
[ 282, 4 ]
[ 296, 30 ]
python
en
['en', 'error', 'th']
False
ColorBar.nticks
(self)
Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". The 'nticks' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int
Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". The 'nticks' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]
def nticks(self): """ Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". The 'nticks' property is a integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] Returns ------- int """ return self["nticks"]
[ "def", "nticks", "(", "self", ")", ":", "return", "self", "[", "\"nticks\"", "]" ]
[ 305, 4 ]
[ 320, 29 ]
python
en
['en', 'error', 'th']
False
ColorBar.outlinecolor
(self)
Sets the axis line color. The 'outlinecolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
Sets the axis line color. The 'outlinecolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
def outlinecolor(self): """ Sets the axis line color. The 'outlinecolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["outlinecolor"]
[ "def", "outlinecolor", "(", "self", ")", ":", "return", "self", "[", "\"outlinecolor\"", "]" ]
[ 329, 4 ]
[ 379, 35 ]
python
en
['en', 'error', 'th']
False
ColorBar.outlinewidth
(self)
Sets the width (in px) of the axis line. The 'outlinewidth' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the width (in px) of the axis line. The 'outlinewidth' property is a number and may be specified as: - An int or float in the interval [0, inf]
def outlinewidth(self): """ Sets the width (in px) of the axis line. The 'outlinewidth' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["outlinewidth"]
[ "def", "outlinewidth", "(", "self", ")", ":", "return", "self", "[", "\"outlinewidth\"", "]" ]
[ 388, 4 ]
[ 399, 35 ]
python
en
['en', 'error', 'th']
False
ColorBar.separatethousands
(self)
If "true", even 4-digit integers are separated The 'separatethousands' property must be specified as a bool (either True, or False) Returns ------- bool
If "true", even 4-digit integers are separated The 'separatethousands' property must be specified as a bool (either True, or False)
def separatethousands(self): """ If "true", even 4-digit integers are separated The 'separatethousands' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["separatethousands"]
[ "def", "separatethousands", "(", "self", ")", ":", "return", "self", "[", "\"separatethousands\"", "]" ]
[ 408, 4 ]
[ 419, 40 ]
python
en
['en', 'error', 'th']
False
ColorBar.showexponent
(self)
If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. The 'showexponent' property is an enumeration that may be specified as: - One of the following enumeration values: ['all', 'first', 'last', 'none'] Returns ------- Any
If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. The 'showexponent' property is an enumeration that may be specified as: - One of the following enumeration values: ['all', 'first', 'last', 'none']
def showexponent(self): """ If "all", all exponents are shown besides their significands. If "first", only the exponent of the first tick is shown. If "last", only the exponent of the last tick is shown. If "none", no exponents appear. The 'showexponent' property is an enumeration that may be specified as: - One of the following enumeration values: ['all', 'first', 'last', 'none'] Returns ------- Any """ return self["showexponent"]
[ "def", "showexponent", "(", "self", ")", ":", "return", "self", "[", "\"showexponent\"", "]" ]
[ 428, 4 ]
[ 443, 35 ]
python
en
['en', 'error', 'th']
False
ColorBar.showticklabels
(self)
Determines whether or not the tick labels are drawn. The 'showticklabels' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not the tick labels are drawn. The 'showticklabels' property must be specified as a bool (either True, or False)
def showticklabels(self): """ Determines whether or not the tick labels are drawn. The 'showticklabels' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["showticklabels"]
[ "def", "showticklabels", "(", "self", ")", ":", "return", "self", "[", "\"showticklabels\"", "]" ]
[ 452, 4 ]
[ 463, 37 ]
python
en
['en', 'error', 'th']
False
ColorBar.showtickprefix
(self)
If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. The 'showtickprefix' property is an enumeration that may be specified as: - One of the following enumeration values: ['all', 'first', 'last', 'none'] Returns ------- Any
If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. The 'showtickprefix' property is an enumeration that may be specified as: - One of the following enumeration values: ['all', 'first', 'last', 'none']
def showtickprefix(self): """ If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. The 'showtickprefix' property is an enumeration that may be specified as: - One of the following enumeration values: ['all', 'first', 'last', 'none'] Returns ------- Any """ return self["showtickprefix"]
[ "def", "showtickprefix", "(", "self", ")", ":", "return", "self", "[", "\"showtickprefix\"", "]" ]
[ 472, 4 ]
[ 487, 37 ]
python
en
['en', 'error', 'th']
False
ColorBar.showticksuffix
(self)
Same as `showtickprefix` but for tick suffixes. The 'showticksuffix' property is an enumeration that may be specified as: - One of the following enumeration values: ['all', 'first', 'last', 'none'] Returns ------- Any
Same as `showtickprefix` but for tick suffixes. The 'showticksuffix' property is an enumeration that may be specified as: - One of the following enumeration values: ['all', 'first', 'last', 'none']
def showticksuffix(self): """ Same as `showtickprefix` but for tick suffixes. The 'showticksuffix' property is an enumeration that may be specified as: - One of the following enumeration values: ['all', 'first', 'last', 'none'] Returns ------- Any """ return self["showticksuffix"]
[ "def", "showticksuffix", "(", "self", ")", ":", "return", "self", "[", "\"showticksuffix\"", "]" ]
[ 496, 4 ]
[ 508, 37 ]
python
en
['en', 'error', 'th']
False
ColorBar.thickness
(self)
Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels. The 'thickness' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels. The 'thickness' property is a number and may be specified as: - An int or float in the interval [0, inf]
def thickness(self): """ Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels. The 'thickness' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["thickness"]
[ "def", "thickness", "(", "self", ")", ":", "return", "self", "[", "\"thickness\"", "]" ]
[ 517, 4 ]
[ 529, 32 ]
python
en
['en', 'error', 'th']
False
ColorBar.thicknessmode
(self)
Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot "fraction" or in "pixels". Use `thickness` to set the value. The 'thicknessmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['fraction', 'pixels'] Returns ------- Any
Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot "fraction" or in "pixels". Use `thickness` to set the value. The 'thicknessmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['fraction', 'pixels']
def thicknessmode(self): """ Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot "fraction" or in "pixels". Use `thickness` to set the value. The 'thicknessmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['fraction', 'pixels'] Returns ------- Any """ return self["thicknessmode"]
[ "def", "thicknessmode", "(", "self", ")", ":", "return", "self", "[", "\"thicknessmode\"", "]" ]
[ 538, 4 ]
[ 552, 36 ]
python
en
['en', 'error', 'th']
False
ColorBar.tick0
(self)
Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. The 'tick0' property accepts values of any type Returns ------- Any
Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. The 'tick0' property accepts values of any type
def tick0(self): """ Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is "log", then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L<f>* (see `dtick` for more info). If the axis `type` is "date", it should be a date string, like date data. If the axis `type` is "category", it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears. The 'tick0' property accepts values of any type Returns ------- Any """ return self["tick0"]
[ "def", "tick0", "(", "self", ")", ":", "return", "self", "[", "\"tick0\"", "]" ]
[ 561, 4 ]
[ 579, 28 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickangle
(self)
Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. The 'tickangle' property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns ------- int|float
Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. The 'tickangle' property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90).
def tickangle(self): """ Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. The 'tickangle' property is a angle (in degrees) that may be specified as a number between -180 and 180. Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns ------- int|float """ return self["tickangle"]
[ "def", "tickangle", "(", "self", ")", ":", "return", "self", "[", "\"tickangle\"", "]" ]
[ 588, 4 ]
[ 603, 32 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickcolor
(self)
Sets the tick color. The 'tickcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str
Sets the tick color. The 'tickcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
def tickcolor(self): """ Sets the tick color. The 'tickcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen Returns ------- str """ return self["tickcolor"]
[ "def", "tickcolor", "(", "self", ")", ":", "return", "self", "[", "\"tickcolor\"", "]" ]
[ 612, 4 ]
[ 662, 32 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickfont
(self)
Sets the color bar's tick label font The 'tickfont' property is an instance of Tickfont that may be specified as: - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont` - A dict of string/value properties that will be passed to the Tickfont constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". size Returns ------- plotly.graph_objs.densitymapbox.colorbar.Tickfont
Sets the color bar's tick label font The 'tickfont' property is an instance of Tickfont that may be specified as: - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont` - A dict of string/value properties that will be passed to the Tickfont constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". size
def tickfont(self): """ Sets the color bar's tick label font The 'tickfont' property is an instance of Tickfont that may be specified as: - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont` - A dict of string/value properties that will be passed to the Tickfont constructor Supported dict properties: color family HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include "Arial", "Balto", "Courier New", "Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". size Returns ------- plotly.graph_objs.densitymapbox.colorbar.Tickfont """ return self["tickfont"]
[ "def", "tickfont", "(", "self", ")", ":", "return", "self", "[", "\"tickfont\"", "]" ]
[ 671, 4 ]
[ 708, 31 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickformat
(self)
Sets the tick label formatting rule using d3 formatting mini- languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api- reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" The 'tickformat' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
Sets the tick label formatting rule using d3 formatting mini- languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api- reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" The 'tickformat' property is a string and must be specified as: - A string - A number that will be converted to a string
def tickformat(self): """ Sets the tick label formatting rule using d3 formatting mini- languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api- reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" The 'tickformat' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["tickformat"]
[ "def", "tickformat", "(", "self", ")", ":", "return", "self", "[", "\"tickformat\"", "]" ]
[ 717, 4 ]
[ 737, 33 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickformatstops
(self)
The 'tickformatstops' property is a tuple of instances of Tickformatstop that may be specified as: - A list or tuple of instances of plotly.graph_objs.densitymapbox.colorbar.Tickformatstop - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor Supported dict properties: dtickrange range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" enabled Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. name When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. templateitemname Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. value string - dtickformat for described zoom level, the same as "tickformat" Returns ------- tuple[plotly.graph_objs.densitymapbox.colorbar.Tickformatstop]
The 'tickformatstops' property is a tuple of instances of Tickformatstop that may be specified as: - A list or tuple of instances of plotly.graph_objs.densitymapbox.colorbar.Tickformatstop - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor Supported dict properties: dtickrange range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" enabled Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. name When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. templateitemname Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. value string - dtickformat for described zoom level, the same as "tickformat"
def tickformatstops(self): """ The 'tickformatstops' property is a tuple of instances of Tickformatstop that may be specified as: - A list or tuple of instances of plotly.graph_objs.densitymapbox.colorbar.Tickformatstop - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor Supported dict properties: dtickrange range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" enabled Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. name When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template. templateitemname Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`. value string - dtickformat for described zoom level, the same as "tickformat" Returns ------- tuple[plotly.graph_objs.densitymapbox.colorbar.Tickformatstop] """ return self["tickformatstops"]
[ "def", "tickformatstops", "(", "self", ")", ":", "return", "self", "[", "\"tickformatstops\"", "]" ]
[ 746, 4 ]
[ 794, 38 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickformatstopdefaults
(self)
When used in a template (as layout.template.data.densitymapbox. colorbar.tickformatstopdefaults), sets the default property values to use for elements of densitymapbox.colorbar.tickformatstops The 'tickformatstopdefaults' property is an instance of Tickformatstop that may be specified as: - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop` - A dict of string/value properties that will be passed to the Tickformatstop constructor Supported dict properties: Returns ------- plotly.graph_objs.densitymapbox.colorbar.Tickformatstop
When used in a template (as layout.template.data.densitymapbox. colorbar.tickformatstopdefaults), sets the default property values to use for elements of densitymapbox.colorbar.tickformatstops The 'tickformatstopdefaults' property is an instance of Tickformatstop that may be specified as: - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop` - A dict of string/value properties that will be passed to the Tickformatstop constructor Supported dict properties:
def tickformatstopdefaults(self): """ When used in a template (as layout.template.data.densitymapbox. colorbar.tickformatstopdefaults), sets the default property values to use for elements of densitymapbox.colorbar.tickformatstops The 'tickformatstopdefaults' property is an instance of Tickformatstop that may be specified as: - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop` - A dict of string/value properties that will be passed to the Tickformatstop constructor Supported dict properties: Returns ------- plotly.graph_objs.densitymapbox.colorbar.Tickformatstop """ return self["tickformatstopdefaults"]
[ "def", "tickformatstopdefaults", "(", "self", ")", ":", "return", "self", "[", "\"tickformatstopdefaults\"", "]" ]
[ 803, 4 ]
[ 822, 45 ]
python
en
['en', 'error', 'th']
False
ColorBar.ticklen
(self)
Sets the tick length (in px). The 'ticklen' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the tick length (in px). The 'ticklen' property is a number and may be specified as: - An int or float in the interval [0, inf]
def ticklen(self): """ Sets the tick length (in px). The 'ticklen' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["ticklen"]
[ "def", "ticklen", "(", "self", ")", ":", "return", "self", "[", "\"ticklen\"", "]" ]
[ 831, 4 ]
[ 842, 30 ]
python
en
['en', 'error', 'th']
False
ColorBar.tickmode
(self)
Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). The 'tickmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['auto', 'linear', 'array'] Returns ------- Any
Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). The 'tickmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['auto', 'linear', 'array']
def tickmode(self): """ Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided). The 'tickmode' property is an enumeration that may be specified as: - One of the following enumeration values: ['auto', 'linear', 'array'] Returns ------- Any """ return self["tickmode"]
[ "def", "tickmode", "(", "self", ")", ":", "return", "self", "[", "\"tickmode\"", "]" ]
[ 851, 4 ]
[ 869, 31 ]
python
en
['en', 'error', 'th']
False