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
Isosurface.idssrc
(self)
Sets the source reference on Chart Studio Cloud for ids . The 'idssrc' 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 ids . The 'idssrc' property must be specified as a string or as a plotly.grid_objs.Column object
def idssrc(self): """ Sets the source reference on Chart Studio Cloud for ids . The 'idssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["idssrc"]
[ "def", "idssrc", "(", "self", ")", ":", "return", "self", "[", "\"idssrc\"", "]" ]
[ 858, 4 ]
[ 869, 29 ]
python
en
['en', 'error', 'th']
False
Isosurface.isomax
(self)
Sets the maximum boundary for iso-surface plot. The 'isomax' property is a number and may be specified as: - An int or float Returns ------- int|float
Sets the maximum boundary for iso-surface plot. The 'isomax' property is a number and may be specified as: - An int or float
def isomax(self): """ Sets the maximum boundary for iso-surface plot. The 'isomax' property is a number and may be specified as: - An int or float Returns ------- int|float """ return self["isomax"]
[ "def", "isomax", "(", "self", ")", ":", "return", "self", "[", "\"isomax\"", "]" ]
[ 878, 4 ]
[ 889, 29 ]
python
en
['en', 'error', 'th']
False
Isosurface.isomin
(self)
Sets the minimum boundary for iso-surface plot. The 'isomin' property is a number and may be specified as: - An int or float Returns ------- int|float
Sets the minimum boundary for iso-surface plot. The 'isomin' property is a number and may be specified as: - An int or float
def isomin(self): """ Sets the minimum boundary for iso-surface plot. The 'isomin' property is a number and may be specified as: - An int or float Returns ------- int|float """ return self["isomin"]
[ "def", "isomin", "(", "self", ")", ":", "return", "self", "[", "\"isomin\"", "]" ]
[ 898, 4 ]
[ 909, 29 ]
python
en
['en', 'error', 'th']
False
Isosurface.legendgroup
(self)
Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. The 'legendgroup' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. The 'legendgroup' property is a string and must be specified as: - A string - A number that will be converted to a string
def legendgroup(self): """ Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. The 'legendgroup' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["legendgroup"]
[ "def", "legendgroup", "(", "self", ")", ":", "return", "self", "[", "\"legendgroup\"", "]" ]
[ 918, 4 ]
[ 932, 34 ]
python
en
['en', 'error', 'th']
False
Isosurface.lighting
(self)
The 'lighting' property is an instance of Lighting that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Lighting` - A dict of string/value properties that will be passed to the Lighting constructor Supported dict properties: ambient Ambient light increases overall color visibility but can wash out the image. diffuse Represents the extent that incident rays are reflected in a range of angles. facenormalsepsilon Epsilon for face normals calculation avoids math issues arising from degenerate geometry. fresnel Represents the reflectance as a dependency of the viewing angle; e.g. paper is reflective when viewing it from the edge of the paper (almost 90 degrees), causing shine. roughness Alters specular reflection; the rougher the surface, the wider and less contrasty the shine. specular Represents the level that incident rays are reflected in a single direction, causing shine. vertexnormalsepsilon Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry. Returns ------- plotly.graph_objs.isosurface.Lighting
The 'lighting' property is an instance of Lighting that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Lighting` - A dict of string/value properties that will be passed to the Lighting constructor Supported dict properties: ambient Ambient light increases overall color visibility but can wash out the image. diffuse Represents the extent that incident rays are reflected in a range of angles. facenormalsepsilon Epsilon for face normals calculation avoids math issues arising from degenerate geometry. fresnel Represents the reflectance as a dependency of the viewing angle; e.g. paper is reflective when viewing it from the edge of the paper (almost 90 degrees), causing shine. roughness Alters specular reflection; the rougher the surface, the wider and less contrasty the shine. specular Represents the level that incident rays are reflected in a single direction, causing shine. vertexnormalsepsilon Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry.
def lighting(self): """ The 'lighting' property is an instance of Lighting that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Lighting` - A dict of string/value properties that will be passed to the Lighting constructor Supported dict properties: ambient Ambient light increases overall color visibility but can wash out the image. diffuse Represents the extent that incident rays are reflected in a range of angles. facenormalsepsilon Epsilon for face normals calculation avoids math issues arising from degenerate geometry. fresnel Represents the reflectance as a dependency of the viewing angle; e.g. paper is reflective when viewing it from the edge of the paper (almost 90 degrees), causing shine. roughness Alters specular reflection; the rougher the surface, the wider and less contrasty the shine. specular Represents the level that incident rays are reflected in a single direction, causing shine. vertexnormalsepsilon Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry. Returns ------- plotly.graph_objs.isosurface.Lighting """ return self["lighting"]
[ "def", "lighting", "(", "self", ")", ":", "return", "self", "[", "\"lighting\"", "]" ]
[ 941, 4 ]
[ 980, 31 ]
python
en
['en', 'error', 'th']
False
Isosurface.lightposition
(self)
The 'lightposition' property is an instance of Lightposition that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Lightposition` - A dict of string/value properties that will be passed to the Lightposition constructor Supported dict properties: x Numeric vector, representing the X coordinate for each vertex. y Numeric vector, representing the Y coordinate for each vertex. z Numeric vector, representing the Z coordinate for each vertex. Returns ------- plotly.graph_objs.isosurface.Lightposition
The 'lightposition' property is an instance of Lightposition that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Lightposition` - A dict of string/value properties that will be passed to the Lightposition constructor Supported dict properties: x Numeric vector, representing the X coordinate for each vertex. y Numeric vector, representing the Y coordinate for each vertex. z Numeric vector, representing the Z coordinate for each vertex.
def lightposition(self): """ The 'lightposition' property is an instance of Lightposition that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Lightposition` - A dict of string/value properties that will be passed to the Lightposition constructor Supported dict properties: x Numeric vector, representing the X coordinate for each vertex. y Numeric vector, representing the Y coordinate for each vertex. z Numeric vector, representing the Z coordinate for each vertex. Returns ------- plotly.graph_objs.isosurface.Lightposition """ return self["lightposition"]
[ "def", "lightposition", "(", "self", ")", ":", "return", "self", "[", "\"lightposition\"", "]" ]
[ 989, 4 ]
[ 1013, 36 ]
python
en
['en', 'error', 'th']
False
Isosurface.meta
(self)
Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index. The 'meta' property accepts values of any type Returns ------- Any|numpy.ndarray
Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index. The 'meta' property accepts values of any type
def meta(self): """ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index. The 'meta' property accepts values of any type Returns ------- Any|numpy.ndarray """ return self["meta"]
[ "def", "meta", "(", "self", ")", ":", "return", "self", "[", "\"meta\"", "]" ]
[ 1022, 4 ]
[ 1041, 27 ]
python
en
['en', 'error', 'th']
False
Isosurface.metasrc
(self)
Sets the source reference on Chart Studio Cloud for meta . The 'metasrc' 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 meta . The 'metasrc' property must be specified as a string or as a plotly.grid_objs.Column object
def metasrc(self): """ Sets the source reference on Chart Studio Cloud for meta . The 'metasrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["metasrc"]
[ "def", "metasrc", "(", "self", ")", ":", "return", "self", "[", "\"metasrc\"", "]" ]
[ 1050, 4 ]
[ 1061, 30 ]
python
en
['en', 'error', 'th']
False
Isosurface.name
(self)
Sets the trace name. The trace name appear as the legend item and on hover. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
Sets the trace name. The trace name appear as the legend item and on hover. 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): """ Sets the trace name. The trace name appear as the legend item and on hover. 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\"", "]" ]
[ 1070, 4 ]
[ 1083, 27 ]
python
en
['en', 'error', 'th']
False
Isosurface.opacity
(self)
Sets the opacity of the surface. Please note that in the case of using high `opacity` values for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float
Sets the opacity of the surface. Please note that in the case of using high `opacity` values for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1]
def opacity(self): """ Sets the opacity of the surface. Please note that in the case of using high `opacity` values for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float """ return self["opacity"]
[ "def", "opacity", "(", "self", ")", ":", "return", "self", "[", "\"opacity\"", "]" ]
[ 1092, 4 ]
[ 1108, 30 ]
python
en
['en', 'error', 'th']
False
Isosurface.reversescale
(self)
Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and `cmax` will correspond to the first color. The 'reversescale' property must be specified as a bool (either True, or False) Returns ------- bool
Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and `cmax` will correspond to the first color. The 'reversescale' property must be specified as a bool (either True, or False)
def reversescale(self): """ Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and `cmax` will correspond to the first color. The 'reversescale' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["reversescale"]
[ "def", "reversescale", "(", "self", ")", ":", "return", "self", "[", "\"reversescale\"", "]" ]
[ 1117, 4 ]
[ 1130, 35 ]
python
en
['en', 'error', 'th']
False
Isosurface.scene
(self)
Sets a reference between this trace's 3D coordinate system and a 3D scene. If "scene" (the default value), the (x,y,z) coordinates refer to `layout.scene`. If "scene2", the (x,y,z) coordinates refer to `layout.scene2`, and so on. The 'scene' property is an identifier of a particular subplot, of type 'scene', that may be specified as the string 'scene' optionally followed by an integer >= 1 (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) Returns ------- str
Sets a reference between this trace's 3D coordinate system and a 3D scene. If "scene" (the default value), the (x,y,z) coordinates refer to `layout.scene`. If "scene2", the (x,y,z) coordinates refer to `layout.scene2`, and so on. The 'scene' property is an identifier of a particular subplot, of type 'scene', that may be specified as the string 'scene' optionally followed by an integer >= 1 (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.)
def scene(self): """ Sets a reference between this trace's 3D coordinate system and a 3D scene. If "scene" (the default value), the (x,y,z) coordinates refer to `layout.scene`. If "scene2", the (x,y,z) coordinates refer to `layout.scene2`, and so on. The 'scene' property is an identifier of a particular subplot, of type 'scene', that may be specified as the string 'scene' optionally followed by an integer >= 1 (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) Returns ------- str """ return self["scene"]
[ "def", "scene", "(", "self", ")", ":", "return", "self", "[", "\"scene\"", "]" ]
[ 1139, 4 ]
[ 1155, 28 ]
python
en
['en', 'error', 'th']
False
Isosurface.showlegend
(self)
Determines whether or not an item corresponding to this trace is shown in the legend. The 'showlegend' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not an item corresponding to this trace is shown in the legend. The 'showlegend' property must be specified as a bool (either True, or False)
def showlegend(self): """ Determines whether or not an item corresponding to this trace is shown in the legend. The 'showlegend' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["showlegend"]
[ "def", "showlegend", "(", "self", ")", ":", "return", "self", "[", "\"showlegend\"", "]" ]
[ 1164, 4 ]
[ 1176, 33 ]
python
en
['en', 'error', 'th']
False
Isosurface.showscale
(self)
Determines whether or not a colorbar is displayed for this trace. The 'showscale' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not a colorbar is displayed for this trace. The 'showscale' property must be specified as a bool (either True, or False)
def showscale(self): """ Determines whether or not a colorbar is displayed for this trace. The 'showscale' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["showscale"]
[ "def", "showscale", "(", "self", ")", ":", "return", "self", "[", "\"showscale\"", "]" ]
[ 1185, 4 ]
[ 1197, 32 ]
python
en
['en', 'error', 'th']
False
Isosurface.slices
(self)
The 'slices' property is an instance of Slices that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Slices` - A dict of string/value properties that will be passed to the Slices constructor Supported dict properties: x :class:`plotly.graph_objects.isosurface.slices. X` instance or dict with compatible properties y :class:`plotly.graph_objects.isosurface.slices. Y` instance or dict with compatible properties z :class:`plotly.graph_objects.isosurface.slices. Z` instance or dict with compatible properties Returns ------- plotly.graph_objs.isosurface.Slices
The 'slices' property is an instance of Slices that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Slices` - A dict of string/value properties that will be passed to the Slices constructor Supported dict properties: x :class:`plotly.graph_objects.isosurface.slices. X` instance or dict with compatible properties y :class:`plotly.graph_objects.isosurface.slices. Y` instance or dict with compatible properties z :class:`plotly.graph_objects.isosurface.slices. Z` instance or dict with compatible properties
def slices(self): """ The 'slices' property is an instance of Slices that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Slices` - A dict of string/value properties that will be passed to the Slices constructor Supported dict properties: x :class:`plotly.graph_objects.isosurface.slices. X` instance or dict with compatible properties y :class:`plotly.graph_objects.isosurface.slices. Y` instance or dict with compatible properties z :class:`plotly.graph_objects.isosurface.slices. Z` instance or dict with compatible properties Returns ------- plotly.graph_objs.isosurface.Slices """ return self["slices"]
[ "def", "slices", "(", "self", ")", ":", "return", "self", "[", "\"slices\"", "]" ]
[ 1206, 4 ]
[ 1230, 29 ]
python
en
['en', 'error', 'th']
False
Isosurface.spaceframe
(self)
The 'spaceframe' property is an instance of Spaceframe that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Spaceframe` - A dict of string/value properties that will be passed to the Spaceframe constructor Supported dict properties: fill Sets the fill ratio of the `spaceframe` elements. The default fill value is 0.15 meaning that only 15% of the area of every faces of tetras would be shaded. Applying a greater `fill` ratio would allow the creation of stronger elements or could be sued to have entirely closed areas (in case of using 1). show Displays/hides tetrahedron shapes between minimum and maximum iso-values. Often useful when either caps or surfaces are disabled or filled with values less than 1. Returns ------- plotly.graph_objs.isosurface.Spaceframe
The 'spaceframe' property is an instance of Spaceframe that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Spaceframe` - A dict of string/value properties that will be passed to the Spaceframe constructor Supported dict properties: fill Sets the fill ratio of the `spaceframe` elements. The default fill value is 0.15 meaning that only 15% of the area of every faces of tetras would be shaded. Applying a greater `fill` ratio would allow the creation of stronger elements or could be sued to have entirely closed areas (in case of using 1). show Displays/hides tetrahedron shapes between minimum and maximum iso-values. Often useful when either caps or surfaces are disabled or filled with values less than 1.
def spaceframe(self): """ The 'spaceframe' property is an instance of Spaceframe that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Spaceframe` - A dict of string/value properties that will be passed to the Spaceframe constructor Supported dict properties: fill Sets the fill ratio of the `spaceframe` elements. The default fill value is 0.15 meaning that only 15% of the area of every faces of tetras would be shaded. Applying a greater `fill` ratio would allow the creation of stronger elements or could be sued to have entirely closed areas (in case of using 1). show Displays/hides tetrahedron shapes between minimum and maximum iso-values. Often useful when either caps or surfaces are disabled or filled with values less than 1. Returns ------- plotly.graph_objs.isosurface.Spaceframe """ return self["spaceframe"]
[ "def", "spaceframe", "(", "self", ")", ":", "return", "self", "[", "\"spaceframe\"", "]" ]
[ 1239, 4 ]
[ 1267, 33 ]
python
en
['en', 'error', 'th']
False
Isosurface.stream
(self)
The 'stream' property is an instance of Stream that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Stream` - A dict of string/value properties that will be passed to the Stream constructor Supported dict properties: maxpoints Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to 50, only the newest 50 points will be displayed on the plot. token The stream id number links a data trace on a plot with a stream. See https://chart- studio.plotly.com/settings for more details. Returns ------- plotly.graph_objs.isosurface.Stream
The 'stream' property is an instance of Stream that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Stream` - A dict of string/value properties that will be passed to the Stream constructor Supported dict properties: maxpoints Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to 50, only the newest 50 points will be displayed on the plot. token The stream id number links a data trace on a plot with a stream. See https://chart- studio.plotly.com/settings for more details.
def stream(self): """ The 'stream' property is an instance of Stream that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Stream` - A dict of string/value properties that will be passed to the Stream constructor Supported dict properties: maxpoints Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to 50, only the newest 50 points will be displayed on the plot. token The stream id number links a data trace on a plot with a stream. See https://chart- studio.plotly.com/settings for more details. Returns ------- plotly.graph_objs.isosurface.Stream """ return self["stream"]
[ "def", "stream", "(", "self", ")", ":", "return", "self", "[", "\"stream\"", "]" ]
[ 1276, 4 ]
[ 1300, 29 ]
python
en
['en', 'error', 'th']
False
Isosurface.surface
(self)
The 'surface' property is an instance of Surface that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Surface` - A dict of string/value properties that will be passed to the Surface constructor Supported dict properties: count Sets the number of iso-surfaces between minimum and maximum iso-values. By default this value is 2 meaning that only minimum and maximum surfaces would be drawn. fill Sets the fill ratio of the iso-surface. The default fill value of the surface is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. pattern Sets the surface pattern of the iso-surface 3-D sections. The default pattern of the surface is `all` meaning that the rest of surface elements would be shaded. The check options (either 1 or 2) could be used to draw half of the squares on the surface. Using various combinations of capital `A`, `B`, `C`, `D` and `E` may also be used to reduce the number of triangles on the iso-surfaces and creating other patterns of interest. show Hides/displays surfaces between minimum and maximum iso-values. Returns ------- plotly.graph_objs.isosurface.Surface
The 'surface' property is an instance of Surface that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Surface` - A dict of string/value properties that will be passed to the Surface constructor Supported dict properties: count Sets the number of iso-surfaces between minimum and maximum iso-values. By default this value is 2 meaning that only minimum and maximum surfaces would be drawn. fill Sets the fill ratio of the iso-surface. The default fill value of the surface is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. pattern Sets the surface pattern of the iso-surface 3-D sections. The default pattern of the surface is `all` meaning that the rest of surface elements would be shaded. The check options (either 1 or 2) could be used to draw half of the squares on the surface. Using various combinations of capital `A`, `B`, `C`, `D` and `E` may also be used to reduce the number of triangles on the iso-surfaces and creating other patterns of interest. show Hides/displays surfaces between minimum and maximum iso-values.
def surface(self): """ The 'surface' property is an instance of Surface that may be specified as: - An instance of :class:`plotly.graph_objs.isosurface.Surface` - A dict of string/value properties that will be passed to the Surface constructor Supported dict properties: count Sets the number of iso-surfaces between minimum and maximum iso-values. By default this value is 2 meaning that only minimum and maximum surfaces would be drawn. fill Sets the fill ratio of the iso-surface. The default fill value of the surface is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. pattern Sets the surface pattern of the iso-surface 3-D sections. The default pattern of the surface is `all` meaning that the rest of surface elements would be shaded. The check options (either 1 or 2) could be used to draw half of the squares on the surface. Using various combinations of capital `A`, `B`, `C`, `D` and `E` may also be used to reduce the number of triangles on the iso-surfaces and creating other patterns of interest. show Hides/displays surfaces between minimum and maximum iso-values. Returns ------- plotly.graph_objs.isosurface.Surface """ return self["surface"]
[ "def", "surface", "(", "self", ")", ":", "return", "self", "[", "\"surface\"", "]" ]
[ 1309, 4 ]
[ 1350, 30 ]
python
en
['en', 'error', 'th']
False
Isosurface.text
(self)
Sets the text elements associated with the vertices. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. The 'text' property is a string and must be specified as: - A string - A number that will be converted to a string - A tuple, list, or one-dimensional numpy array of the above Returns ------- str|numpy.ndarray
Sets the text elements associated with the vertices. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. The 'text' property is a string and must be specified as: - A string - A number that will be converted to a string - A tuple, list, or one-dimensional numpy array of the above
def text(self): """ Sets the text elements associated with the vertices. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. The 'text' property is a string and must be specified as: - A string - A number that will be converted to a string - A tuple, list, or one-dimensional numpy array of the above Returns ------- str|numpy.ndarray """ return self["text"]
[ "def", "text", "(", "self", ")", ":", "return", "self", "[", "\"text\"", "]" ]
[ 1359, 4 ]
[ 1374, 27 ]
python
en
['en', 'error', 'th']
False
Isosurface.textsrc
(self)
Sets the source reference on Chart Studio Cloud for text . The 'textsrc' 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 text . The 'textsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def textsrc(self): """ Sets the source reference on Chart Studio Cloud for text . The 'textsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["textsrc"]
[ "def", "textsrc", "(", "self", ")", ":", "return", "self", "[", "\"textsrc\"", "]" ]
[ 1383, 4 ]
[ 1394, 30 ]
python
en
['en', 'error', 'th']
False
Isosurface.uid
(self)
Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions. The 'uid' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions. The 'uid' property is a string and must be specified as: - A string - A number that will be converted to a string
def uid(self): """ Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions. The 'uid' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["uid"]
[ "def", "uid", "(", "self", ")", ":", "return", "self", "[", "\"uid\"", "]" ]
[ 1403, 4 ]
[ 1416, 26 ]
python
en
['en', 'error', 'th']
False
Isosurface.uirevision
(self)
Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. The 'uirevision' property accepts values of any type Returns ------- Any
Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. The 'uirevision' property accepts values of any type
def uirevision(self): """ Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. The 'uirevision' property accepts values of any type Returns ------- Any """ return self["uirevision"]
[ "def", "uirevision", "(", "self", ")", ":", "return", "self", "[", "\"uirevision\"", "]" ]
[ 1425, 4 ]
[ 1449, 33 ]
python
en
['en', 'error', 'th']
False
Isosurface.value
(self)
Sets the 4th dimension (value) of the vertices. The 'value' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the 4th dimension (value) of the vertices. The 'value' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def value(self): """ Sets the 4th dimension (value) of the vertices. The 'value' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["value"]
[ "def", "value", "(", "self", ")", ":", "return", "self", "[", "\"value\"", "]" ]
[ 1458, 4 ]
[ 1469, 28 ]
python
en
['en', 'error', 'th']
False
Isosurface.valuesrc
(self)
Sets the source reference on Chart Studio Cloud for value . The 'valuesrc' 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 value . The 'valuesrc' property must be specified as a string or as a plotly.grid_objs.Column object
def valuesrc(self): """ Sets the source reference on Chart Studio Cloud for value . The 'valuesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["valuesrc"]
[ "def", "valuesrc", "(", "self", ")", ":", "return", "self", "[", "\"valuesrc\"", "]" ]
[ 1478, 4 ]
[ 1489, 31 ]
python
en
['en', 'error', 'th']
False
Isosurface.visible
(self)
Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). The 'visible' property is an enumeration that may be specified as: - One of the following enumeration values: [True, False, 'legendonly'] Returns ------- Any
Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). The 'visible' property is an enumeration that may be specified as: - One of the following enumeration values: [True, False, 'legendonly']
def visible(self): """ Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). The 'visible' property is an enumeration that may be specified as: - One of the following enumeration values: [True, False, 'legendonly'] Returns ------- Any """ return self["visible"]
[ "def", "visible", "(", "self", ")", ":", "return", "self", "[", "\"visible\"", "]" ]
[ 1498, 4 ]
[ 1512, 30 ]
python
en
['en', 'error', 'th']
False
Isosurface.x
(self)
Sets the X coordinates of the vertices on X axis. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the X coordinates of the vertices on X axis. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def x(self): """ Sets the X coordinates of the vertices on X axis. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["x"]
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 1521, 4 ]
[ 1532, 24 ]
python
en
['en', 'error', 'th']
False
Isosurface.xsrc
(self)
Sets the source reference on Chart Studio Cloud for x . The 'xsrc' 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 x . The 'xsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def xsrc(self): """ Sets the source reference on Chart Studio Cloud for x . The 'xsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["xsrc"]
[ "def", "xsrc", "(", "self", ")", ":", "return", "self", "[", "\"xsrc\"", "]" ]
[ 1541, 4 ]
[ 1552, 27 ]
python
en
['en', 'error', 'th']
False
Isosurface.y
(self)
Sets the Y coordinates of the vertices on Y axis. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the Y coordinates of the vertices on Y axis. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def y(self): """ Sets the Y coordinates of the vertices on Y axis. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["y"]
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 1561, 4 ]
[ 1572, 24 ]
python
en
['en', 'error', 'th']
False
Isosurface.ysrc
(self)
Sets the source reference on Chart Studio Cloud for y . The 'ysrc' 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 y . The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def ysrc(self): """ Sets the source reference on Chart Studio Cloud for y . The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["ysrc"]
[ "def", "ysrc", "(", "self", ")", ":", "return", "self", "[", "\"ysrc\"", "]" ]
[ 1581, 4 ]
[ 1592, 27 ]
python
en
['en', 'error', 'th']
False
Isosurface.z
(self)
Sets the Z coordinates of the vertices on Z axis. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the Z coordinates of the vertices on Z axis. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def z(self): """ Sets the Z coordinates of the vertices on Z axis. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["z"]
[ "def", "z", "(", "self", ")", ":", "return", "self", "[", "\"z\"", "]" ]
[ 1601, 4 ]
[ 1612, 24 ]
python
en
['en', 'error', 'th']
False
Isosurface.zsrc
(self)
Sets the source reference on Chart Studio Cloud for z . The 'zsrc' 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 z . The 'zsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def zsrc(self): """ Sets the source reference on Chart Studio Cloud for z . The 'zsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["zsrc"]
[ "def", "zsrc", "(", "self", ")", ":", "return", "self", "[", "\"zsrc\"", "]" ]
[ 1621, 4 ]
[ 1632, 27 ]
python
en
['en', 'error', 'th']
False
Isosurface.__init__
( self, arg=None, autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, isomax=None, isomin=None, legendgroup=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, slices=None, spaceframe=None, stream=None, surface=None, text=None, textsrc=None, uid=None, uirevision=None, value=None, valuesrc=None, visible=None, x=None, xsrc=None, y=None, ysrc=None, z=None, zsrc=None, **kwargs )
Construct a new Isosurface object Draws isosurfaces between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex of a uniform or non- uniform 3-D grid. Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.Isosurface` autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `colorscale`. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. caps :class:`plotly.graph_objects.isosurface.Caps` instance or dict with compatible properties cauto Determines whether or not the color domain is computed with respect to the input data (here `value`) or the bounds set in `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` are set by the user. cmax Sets the upper bound of the color domain. Value should have the same units as `value` and if set, `cmin` must be set as well. cmid Sets the mid-point of the color domain by scaling `cmin` and/or `cmax` to be equidistant to this point. Value should have the same units as `value`. Has no effect when `cauto` is `false`. cmin Sets the lower bound of the color domain. Value should have the same units as `value` and if set, `cmax` must be set as well. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar :class:`plotly.graph_objects.isosurface.ColorBar` instance or dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use`cmin` and `cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. contour :class:`plotly.graph_objects.isosurface.Contour` instance or dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements customdatasrc Sets the source reference on Chart Studio Cloud for customdata . flatshading Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low- poly look via flat reflections. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. hoverinfosrc Sets the source reference on Chart Studio Cloud for hoverinfo . hoverlabel :class:`plotly.graph_objects.isosurface.Hoverlabel` instance or dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example "y: %{y}". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time- format}, for example "Day: %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>". To hide the secondary box completely, use an empty tag `<extra></extra>`. hovertemplatesrc Sets the source reference on Chart Studio Cloud for hovertemplate . hovertext Same as `text`. hovertextsrc Sets the source reference on Chart Studio Cloud for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on Chart Studio Cloud for ids . isomax Sets the maximum boundary for iso-surface plot. isomin Sets the minimum boundary for iso-surface plot. legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. lighting :class:`plotly.graph_objects.isosurface.Lighting` instance or dict with compatible properties lightposition :class:`plotly.graph_objects.isosurface.Lightposition` instance or dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index. metasrc Sets the source reference on Chart Studio Cloud for meta . name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the surface. Please note that in the case of using high `opacity` values for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change. reversescale Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and `cmax` will correspond to the first color. scene Sets a reference between this trace's 3D coordinate system and a 3D scene. If "scene" (the default value), the (x,y,z) coordinates refer to `layout.scene`. If "scene2", the (x,y,z) coordinates refer to `layout.scene2`, and so on. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. showscale Determines whether or not a colorbar is displayed for this trace. slices :class:`plotly.graph_objects.isosurface.Slices` instance or dict with compatible properties spaceframe :class:`plotly.graph_objects.isosurface.Spaceframe` instance or dict with compatible properties stream :class:`plotly.graph_objects.isosurface.Stream` instance or dict with compatible properties surface :class:`plotly.graph_objects.isosurface.Surface` instance or dict with compatible properties text Sets the text elements associated with the vertices. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. textsrc Sets the source reference on Chart Studio Cloud for text . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions. uirevision Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. value Sets the 4th dimension (value) of the vertices. valuesrc Sets the source reference on Chart Studio Cloud for value . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). x Sets the X coordinates of the vertices on X axis. xsrc Sets the source reference on Chart Studio Cloud for x . y Sets the Y coordinates of the vertices on Y axis. ysrc Sets the source reference on Chart Studio Cloud for y . z Sets the Z coordinates of the vertices on Z axis. zsrc Sets the source reference on Chart Studio Cloud for z . Returns ------- Isosurface
Construct a new Isosurface object Draws isosurfaces between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex of a uniform or non- uniform 3-D grid. Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace.
def __init__( self, arg=None, autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, flatshading=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, hovertemplate=None, hovertemplatesrc=None, hovertext=None, hovertextsrc=None, ids=None, idssrc=None, isomax=None, isomin=None, legendgroup=None, lighting=None, lightposition=None, meta=None, metasrc=None, name=None, opacity=None, reversescale=None, scene=None, showlegend=None, showscale=None, slices=None, spaceframe=None, stream=None, surface=None, text=None, textsrc=None, uid=None, uirevision=None, value=None, valuesrc=None, visible=None, x=None, xsrc=None, y=None, ysrc=None, z=None, zsrc=None, **kwargs ): """ Construct a new Isosurface object Draws isosurfaces between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex of a uniform or non- uniform 3-D grid. Horizontal or vertical slices, caps as well as spaceframe between iso-min and iso-max values could also be drawn using this trace. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.Isosurface` autocolorscale Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `colorscale`. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed. caps :class:`plotly.graph_objects.isosurface.Caps` instance or dict with compatible properties cauto Determines whether or not the color domain is computed with respect to the input data (here `value`) or the bounds set in `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` are set by the user. cmax Sets the upper bound of the color domain. Value should have the same units as `value` and if set, `cmin` must be set as well. cmid Sets the mid-point of the color domain by scaling `cmin` and/or `cmax` to be equidistant to this point. Value should have the same units as `value`. Has no effect when `cauto` is `false`. cmin Sets the lower bound of the color domain. Value should have the same units as `value` and if set, `cmax` must be set as well. coloraxis Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis. colorbar :class:`plotly.graph_objects.isosurface.ColorBar` instance or dict with compatible properties colorscale Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use`cmin` and `cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrR d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H ot,Blackbody,Earth,Electric,Viridis,Cividis. contour :class:`plotly.graph_objects.isosurface.Contour` instance or dict with compatible properties customdata Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements customdatasrc Sets the source reference on Chart Studio Cloud for customdata . flatshading Determines whether or not normal smoothing is applied to the meshes, creating meshes with an angular, low- poly look via flat reflections. hoverinfo Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. hoverinfosrc Sets the source reference on Chart Studio Cloud for hoverinfo . hoverlabel :class:`plotly.graph_objects.isosurface.Hoverlabel` instance or dict with compatible properties hovertemplate Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example "y: %{y}". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time- format}, for example "Day: %{2019-01-01|%A}". https://github.com/d3/d3-3.x-api- reference/blob/master/Time-Formatting.md#format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>". To hide the secondary box completely, use an empty tag `<extra></extra>`. hovertemplatesrc Sets the source reference on Chart Studio Cloud for hovertemplate . hovertext Same as `text`. hovertextsrc Sets the source reference on Chart Studio Cloud for hovertext . ids Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. idssrc Sets the source reference on Chart Studio Cloud for ids . isomax Sets the maximum boundary for iso-surface plot. isomin Sets the minimum boundary for iso-surface plot. legendgroup Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. lighting :class:`plotly.graph_objects.isosurface.Lighting` instance or dict with compatible properties lightposition :class:`plotly.graph_objects.isosurface.Lightposition` instance or dict with compatible properties meta Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index. metasrc Sets the source reference on Chart Studio Cloud for meta . name Sets the trace name. The trace name appear as the legend item and on hover. opacity Sets the opacity of the surface. Please note that in the case of using high `opacity` values for example a value greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an overlay of multiple transparent surfaces may not perfectly be sorted in depth by the webgl API. This behavior may be improved in the near future and is subject to change. reversescale Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and `cmax` will correspond to the first color. scene Sets a reference between this trace's 3D coordinate system and a 3D scene. If "scene" (the default value), the (x,y,z) coordinates refer to `layout.scene`. If "scene2", the (x,y,z) coordinates refer to `layout.scene2`, and so on. showlegend Determines whether or not an item corresponding to this trace is shown in the legend. showscale Determines whether or not a colorbar is displayed for this trace. slices :class:`plotly.graph_objects.isosurface.Slices` instance or dict with compatible properties spaceframe :class:`plotly.graph_objects.isosurface.Spaceframe` instance or dict with compatible properties stream :class:`plotly.graph_objects.isosurface.Stream` instance or dict with compatible properties surface :class:`plotly.graph_objects.isosurface.Surface` instance or dict with compatible properties text Sets the text elements associated with the vertices. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. textsrc Sets the source reference on Chart Studio Cloud for text . uid Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions. uirevision Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves. value Sets the 4th dimension (value) of the vertices. valuesrc Sets the source reference on Chart Studio Cloud for value . visible Determines whether or not this trace is visible. If "legendonly", the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible). x Sets the X coordinates of the vertices on X axis. xsrc Sets the source reference on Chart Studio Cloud for x . y Sets the Y coordinates of the vertices on Y axis. ysrc Sets the source reference on Chart Studio Cloud for y . z Sets the Z coordinates of the vertices on Z axis. zsrc Sets the source reference on Chart Studio Cloud for z . Returns ------- Isosurface """ super(Isosurface, self).__init__("isosurface") 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.Isosurface constructor must be a dict or an instance of :class:`plotly.graph_objs.Isosurface`""" ) # 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("autocolorscale", None) _v = autocolorscale if autocolorscale is not None else _v if _v is not None: self["autocolorscale"] = _v _v = arg.pop("caps", None) _v = caps if caps is not None else _v if _v is not None: self["caps"] = _v _v = arg.pop("cauto", None) _v = cauto if cauto is not None else _v if _v is not None: self["cauto"] = _v _v = arg.pop("cmax", None) _v = cmax if cmax is not None else _v if _v is not None: self["cmax"] = _v _v = arg.pop("cmid", None) _v = cmid if cmid is not None else _v if _v is not None: self["cmid"] = _v _v = arg.pop("cmin", None) _v = cmin if cmin is not None else _v if _v is not None: self["cmin"] = _v _v = arg.pop("coloraxis", None) _v = coloraxis if coloraxis is not None else _v if _v is not None: self["coloraxis"] = _v _v = arg.pop("colorbar", None) _v = colorbar if colorbar is not None else _v if _v is not None: self["colorbar"] = _v _v = arg.pop("colorscale", None) _v = colorscale if colorscale is not None else _v if _v is not None: self["colorscale"] = _v _v = arg.pop("contour", None) _v = contour if contour is not None else _v if _v is not None: self["contour"] = _v _v = arg.pop("customdata", None) _v = customdata if customdata is not None else _v if _v is not None: self["customdata"] = _v _v = arg.pop("customdatasrc", None) _v = customdatasrc if customdatasrc is not None else _v if _v is not None: self["customdatasrc"] = _v _v = arg.pop("flatshading", None) _v = flatshading if flatshading is not None else _v if _v is not None: self["flatshading"] = _v _v = arg.pop("hoverinfo", None) _v = hoverinfo if hoverinfo is not None else _v if _v is not None: self["hoverinfo"] = _v _v = arg.pop("hoverinfosrc", None) _v = hoverinfosrc if hoverinfosrc is not None else _v if _v is not None: self["hoverinfosrc"] = _v _v = arg.pop("hoverlabel", None) _v = hoverlabel if hoverlabel is not None else _v if _v is not None: self["hoverlabel"] = _v _v = arg.pop("hovertemplate", None) _v = hovertemplate if hovertemplate is not None else _v if _v is not None: self["hovertemplate"] = _v _v = arg.pop("hovertemplatesrc", None) _v = hovertemplatesrc if hovertemplatesrc is not None else _v if _v is not None: self["hovertemplatesrc"] = _v _v = arg.pop("hovertext", None) _v = hovertext if hovertext is not None else _v if _v is not None: self["hovertext"] = _v _v = arg.pop("hovertextsrc", None) _v = hovertextsrc if hovertextsrc is not None else _v if _v is not None: self["hovertextsrc"] = _v _v = arg.pop("ids", None) _v = ids if ids is not None else _v if _v is not None: self["ids"] = _v _v = arg.pop("idssrc", None) _v = idssrc if idssrc is not None else _v if _v is not None: self["idssrc"] = _v _v = arg.pop("isomax", None) _v = isomax if isomax is not None else _v if _v is not None: self["isomax"] = _v _v = arg.pop("isomin", None) _v = isomin if isomin is not None else _v if _v is not None: self["isomin"] = _v _v = arg.pop("legendgroup", None) _v = legendgroup if legendgroup is not None else _v if _v is not None: self["legendgroup"] = _v _v = arg.pop("lighting", None) _v = lighting if lighting is not None else _v if _v is not None: self["lighting"] = _v _v = arg.pop("lightposition", None) _v = lightposition if lightposition is not None else _v if _v is not None: self["lightposition"] = _v _v = arg.pop("meta", None) _v = meta if meta is not None else _v if _v is not None: self["meta"] = _v _v = arg.pop("metasrc", None) _v = metasrc if metasrc is not None else _v if _v is not None: self["metasrc"] = _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("opacity", None) _v = opacity if opacity is not None else _v if _v is not None: self["opacity"] = _v _v = arg.pop("reversescale", None) _v = reversescale if reversescale is not None else _v if _v is not None: self["reversescale"] = _v _v = arg.pop("scene", None) _v = scene if scene is not None else _v if _v is not None: self["scene"] = _v _v = arg.pop("showlegend", None) _v = showlegend if showlegend is not None else _v if _v is not None: self["showlegend"] = _v _v = arg.pop("showscale", None) _v = showscale if showscale is not None else _v if _v is not None: self["showscale"] = _v _v = arg.pop("slices", None) _v = slices if slices is not None else _v if _v is not None: self["slices"] = _v _v = arg.pop("spaceframe", None) _v = spaceframe if spaceframe is not None else _v if _v is not None: self["spaceframe"] = _v _v = arg.pop("stream", None) _v = stream if stream is not None else _v if _v is not None: self["stream"] = _v _v = arg.pop("surface", None) _v = surface if surface is not None else _v if _v is not None: self["surface"] = _v _v = arg.pop("text", None) _v = text if text is not None else _v if _v is not None: self["text"] = _v _v = arg.pop("textsrc", None) _v = textsrc if textsrc is not None else _v if _v is not None: self["textsrc"] = _v _v = arg.pop("uid", None) _v = uid if uid is not None else _v if _v is not None: self["uid"] = _v _v = arg.pop("uirevision", None) _v = uirevision if uirevision is not None else _v if _v is not None: self["uirevision"] = _v _v = arg.pop("value", None) _v = value if value is not None else _v if _v is not None: self["value"] = _v _v = arg.pop("valuesrc", None) _v = valuesrc if valuesrc is not None else _v if _v is not None: self["valuesrc"] = _v _v = arg.pop("visible", None) _v = visible if visible is not None else _v if _v is not None: self["visible"] = _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("xsrc", None) _v = xsrc if xsrc is not None else _v if _v is not None: self["xsrc"] = _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("ysrc", None) _v = ysrc if ysrc is not None else _v if _v is not None: self["ysrc"] = _v _v = arg.pop("z", None) _v = z if z is not None else _v if _v is not None: self["z"] = _v _v = arg.pop("zsrc", None) _v = zsrc if zsrc is not None else _v if _v is not None: self["zsrc"] = _v # Read-only literals # ------------------ self._props["type"] = "isosurface" arg.pop("type", None) # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "autocolorscale", "=", "None", ",", "caps", "=", "None", ",", "cauto", "=", "None", ",", "cmax", "=", "None", ",", "cmid", "=", "None", ",", "cmin", "=", "None", ",", "coloraxis", "=", "None", ",", "colorbar", "=", "None", ",", "colorscale", "=", "None", ",", "contour", "=", "None", ",", "customdata", "=", "None", ",", "customdatasrc", "=", "None", ",", "flatshading", "=", "None", ",", "hoverinfo", "=", "None", ",", "hoverinfosrc", "=", "None", ",", "hoverlabel", "=", "None", ",", "hovertemplate", "=", "None", ",", "hovertemplatesrc", "=", "None", ",", "hovertext", "=", "None", ",", "hovertextsrc", "=", "None", ",", "ids", "=", "None", ",", "idssrc", "=", "None", ",", "isomax", "=", "None", ",", "isomin", "=", "None", ",", "legendgroup", "=", "None", ",", "lighting", "=", "None", ",", "lightposition", "=", "None", ",", "meta", "=", "None", ",", "metasrc", "=", "None", ",", "name", "=", "None", ",", "opacity", "=", "None", ",", "reversescale", "=", "None", ",", "scene", "=", "None", ",", "showlegend", "=", "None", ",", "showscale", "=", "None", ",", "slices", "=", "None", ",", "spaceframe", "=", "None", ",", "stream", "=", "None", ",", "surface", "=", "None", ",", "text", "=", "None", ",", "textsrc", "=", "None", ",", "uid", "=", "None", ",", "uirevision", "=", "None", ",", "value", "=", "None", ",", "valuesrc", "=", "None", ",", "visible", "=", "None", ",", "x", "=", "None", ",", "xsrc", "=", "None", ",", "y", "=", "None", ",", "ysrc", "=", "None", ",", "z", "=", "None", ",", "zsrc", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Isosurface", ",", "self", ")", ".", "__init__", "(", "\"isosurface\"", ")", "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.Isosurface \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.Isosurface`\"\"\"", ")", "# 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", "(", "\"autocolorscale\"", ",", "None", ")", "_v", "=", "autocolorscale", "if", "autocolorscale", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"autocolorscale\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"caps\"", ",", "None", ")", "_v", "=", "caps", "if", "caps", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"caps\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"cauto\"", ",", "None", ")", "_v", "=", "cauto", "if", "cauto", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"cauto\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"cmax\"", ",", "None", ")", "_v", "=", "cmax", "if", "cmax", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"cmax\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"cmid\"", ",", "None", ")", "_v", "=", "cmid", "if", "cmid", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"cmid\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"cmin\"", ",", "None", ")", "_v", "=", "cmin", "if", "cmin", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"cmin\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"coloraxis\"", ",", "None", ")", "_v", "=", "coloraxis", "if", "coloraxis", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"coloraxis\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"colorbar\"", ",", "None", ")", "_v", "=", "colorbar", "if", "colorbar", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"colorbar\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"colorscale\"", ",", "None", ")", "_v", "=", "colorscale", "if", "colorscale", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"colorscale\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"contour\"", ",", "None", ")", "_v", "=", "contour", "if", "contour", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"contour\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"customdata\"", ",", "None", ")", "_v", "=", "customdata", "if", "customdata", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"customdata\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"customdatasrc\"", ",", "None", ")", "_v", "=", "customdatasrc", "if", "customdatasrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"customdatasrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"flatshading\"", ",", "None", ")", "_v", "=", "flatshading", "if", "flatshading", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"flatshading\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"hoverinfo\"", ",", "None", ")", "_v", "=", "hoverinfo", "if", "hoverinfo", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"hoverinfo\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"hoverinfosrc\"", ",", "None", ")", "_v", "=", "hoverinfosrc", "if", "hoverinfosrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"hoverinfosrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"hoverlabel\"", ",", "None", ")", "_v", "=", "hoverlabel", "if", "hoverlabel", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"hoverlabel\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"hovertemplate\"", ",", "None", ")", "_v", "=", "hovertemplate", "if", "hovertemplate", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"hovertemplate\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"hovertemplatesrc\"", ",", "None", ")", "_v", "=", "hovertemplatesrc", "if", "hovertemplatesrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"hovertemplatesrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"hovertext\"", ",", "None", ")", "_v", "=", "hovertext", "if", "hovertext", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"hovertext\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"hovertextsrc\"", ",", "None", ")", "_v", "=", "hovertextsrc", "if", "hovertextsrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"hovertextsrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"ids\"", ",", "None", ")", "_v", "=", "ids", "if", "ids", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"ids\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"idssrc\"", ",", "None", ")", "_v", "=", "idssrc", "if", "idssrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"idssrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"isomax\"", ",", "None", ")", "_v", "=", "isomax", "if", "isomax", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"isomax\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"isomin\"", ",", "None", ")", "_v", "=", "isomin", "if", "isomin", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"isomin\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"legendgroup\"", ",", "None", ")", "_v", "=", "legendgroup", "if", "legendgroup", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"legendgroup\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"lighting\"", ",", "None", ")", "_v", "=", "lighting", "if", "lighting", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"lighting\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"lightposition\"", ",", "None", ")", "_v", "=", "lightposition", "if", "lightposition", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"lightposition\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"meta\"", ",", "None", ")", "_v", "=", "meta", "if", "meta", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"meta\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"metasrc\"", ",", "None", ")", "_v", "=", "metasrc", "if", "metasrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"metasrc\"", "]", "=", "_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", "(", "\"opacity\"", ",", "None", ")", "_v", "=", "opacity", "if", "opacity", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"opacity\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"reversescale\"", ",", "None", ")", "_v", "=", "reversescale", "if", "reversescale", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"reversescale\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"scene\"", ",", "None", ")", "_v", "=", "scene", "if", "scene", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"scene\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"showlegend\"", ",", "None", ")", "_v", "=", "showlegend", "if", "showlegend", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"showlegend\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"showscale\"", ",", "None", ")", "_v", "=", "showscale", "if", "showscale", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"showscale\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"slices\"", ",", "None", ")", "_v", "=", "slices", "if", "slices", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"slices\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"spaceframe\"", ",", "None", ")", "_v", "=", "spaceframe", "if", "spaceframe", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"spaceframe\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"stream\"", ",", "None", ")", "_v", "=", "stream", "if", "stream", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"stream\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"surface\"", ",", "None", ")", "_v", "=", "surface", "if", "surface", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"surface\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"text\"", ",", "None", ")", "_v", "=", "text", "if", "text", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"text\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"textsrc\"", ",", "None", ")", "_v", "=", "textsrc", "if", "textsrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"textsrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"uid\"", ",", "None", ")", "_v", "=", "uid", "if", "uid", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"uid\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"uirevision\"", ",", "None", ")", "_v", "=", "uirevision", "if", "uirevision", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"uirevision\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"value\"", ",", "None", ")", "_v", "=", "value", "if", "value", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"value\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"valuesrc\"", ",", "None", ")", "_v", "=", "valuesrc", "if", "valuesrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"valuesrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"visible\"", ",", "None", ")", "_v", "=", "visible", "if", "visible", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"visible\"", "]", "=", "_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", "(", "\"xsrc\"", ",", "None", ")", "_v", "=", "xsrc", "if", "xsrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"xsrc\"", "]", "=", "_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", "(", "\"ysrc\"", ",", "None", ")", "_v", "=", "ysrc", "if", "ysrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"ysrc\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"z\"", ",", "None", ")", "_v", "=", "z", "if", "z", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"z\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"zsrc\"", ",", "None", ")", "_v", "=", "zsrc", "if", "zsrc", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"zsrc\"", "]", "=", "_v", "# Read-only literals", "# ------------------", "self", ".", "_props", "[", "\"type\"", "]", "=", "\"isosurface\"", "arg", ".", "pop", "(", "\"type\"", ",", "None", ")", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 1889, 4 ]
[ 2454, 34 ]
python
en
['en', 'error', 'th']
False
gapminder
()
Each row represents a country on a given year. https://www.gapminder.org/data/ Returns: A `pandas.DataFrame` with 1704 rows and the following columns: `['country', 'continent', 'year', 'lifeExp', 'pop', 'gdpPercap', 'iso_alpha', 'iso_num']`.
Each row represents a country on a given year.
def gapminder(): """ Each row represents a country on a given year. https://www.gapminder.org/data/ Returns: A `pandas.DataFrame` with 1704 rows and the following columns: `['country', 'continent', 'year', 'lifeExp', 'pop', 'gdpPercap', 'iso_alpha', 'iso_num']`. """ return _get_dataset("gapminder")
[ "def", "gapminder", "(", ")", ":", "return", "_get_dataset", "(", "\"gapminder\"", ")" ]
[ 5, 0 ]
[ 16, 36 ]
python
en
['en', 'error', 'th']
False
tips
()
Each row represents a restaurant bill. https://vincentarelbundock.github.io/Rdatasets/doc/reshape2/tips.html Returns: A `pandas.DataFrame` with 244 rows and the following columns: `['total_bill', 'tip', 'sex', 'smoker', 'day', 'time', 'size']`.
Each row represents a restaurant bill.
def tips(): """ Each row represents a restaurant bill. https://vincentarelbundock.github.io/Rdatasets/doc/reshape2/tips.html Returns: A `pandas.DataFrame` with 244 rows and the following columns: `['total_bill', 'tip', 'sex', 'smoker', 'day', 'time', 'size']`. """ return _get_dataset("tips")
[ "def", "tips", "(", ")", ":", "return", "_get_dataset", "(", "\"tips\"", ")" ]
[ 19, 0 ]
[ 29, 31 ]
python
en
['en', 'error', 'th']
False
iris
()
Each row represents a flower. https://en.wikipedia.org/wiki/Iris_flower_data_set Returns: A `pandas.DataFrame` with 150 rows and the following columns: `['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'species', 'species_id']`.
Each row represents a flower.
def iris(): """ Each row represents a flower. https://en.wikipedia.org/wiki/Iris_flower_data_set Returns: A `pandas.DataFrame` with 150 rows and the following columns: `['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'species', 'species_id']`. """ return _get_dataset("iris")
[ "def", "iris", "(", ")", ":", "return", "_get_dataset", "(", "\"iris\"", ")" ]
[ 32, 0 ]
[ 42, 31 ]
python
en
['en', 'error', 'th']
False
wind
()
Each row represents a level of wind intensity in a cardinal direction, and its frequency. Returns: A `pandas.DataFrame` with 128 rows and the following columns: `['direction', 'strength', 'frequency']`.
Each row represents a level of wind intensity in a cardinal direction, and its frequency.
def wind(): """ Each row represents a level of wind intensity in a cardinal direction, and its frequency. Returns: A `pandas.DataFrame` with 128 rows and the following columns: `['direction', 'strength', 'frequency']`. """ return _get_dataset("wind")
[ "def", "wind", "(", ")", ":", "return", "_get_dataset", "(", "\"wind\"", ")" ]
[ 45, 0 ]
[ 53, 31 ]
python
en
['en', 'error', 'th']
False
election
()
Each row represents voting results for an electoral district in the 2013 Montreal mayoral election. Returns: A `pandas.DataFrame` with 58 rows and the following columns: `['district', 'Coderre', 'Bergeron', 'Joly', 'total', 'winner', 'result', 'district_id']`.
Each row represents voting results for an electoral district in the 2013 Montreal mayoral election.
def election(): """ Each row represents voting results for an electoral district in the 2013 Montreal mayoral election. Returns: A `pandas.DataFrame` with 58 rows and the following columns: `['district', 'Coderre', 'Bergeron', 'Joly', 'total', 'winner', 'result', 'district_id']`. """ return _get_dataset("election")
[ "def", "election", "(", ")", ":", "return", "_get_dataset", "(", "\"election\"", ")" ]
[ 56, 0 ]
[ 65, 35 ]
python
en
['en', 'error', 'th']
False
election_geojson
()
Each feature represents an electoral district in the 2013 Montreal mayoral election. Returns: A GeoJSON-formatted `dict` with 58 polygon or multi-polygon features whose `id` is an electoral district numerical ID and whose `district` property is the ID and district name.
Each feature represents an electoral district in the 2013 Montreal mayoral election.
def election_geojson(): """ Each feature represents an electoral district in the 2013 Montreal mayoral election. Returns: A GeoJSON-formatted `dict` with 58 polygon or multi-polygon features whose `id` is an electoral district numerical ID and whose `district` property is the ID and district name. """ import gzip import json import os path = os.path.join( os.path.dirname(os.path.dirname(__file__)), "package_data", "datasets", "election.geojson.gz", ) with gzip.GzipFile(path, "r") as f: result = json.loads(f.read().decode("utf-8")) return result
[ "def", "election_geojson", "(", ")", ":", "import", "gzip", "import", "json", "import", "os", "path", "=", "os", ".", "path", ".", "join", "(", "os", ".", "path", ".", "dirname", "(", "os", ".", "path", ".", "dirname", "(", "__file__", ")", ")", ",", "\"package_data\"", ",", "\"datasets\"", ",", "\"election.geojson.gz\"", ",", ")", "with", "gzip", ".", "GzipFile", "(", "path", ",", "\"r\"", ")", "as", "f", ":", "result", "=", "json", ".", "loads", "(", "f", ".", "read", "(", ")", ".", "decode", "(", "\"utf-8\"", ")", ")", "return", "result" ]
[ 68, 0 ]
[ 89, 17 ]
python
en
['en', 'error', 'th']
False
carshare
()
Each row represents the availability of car-sharing services near the centroid of a zone in Montreal over a month-long period. Returns: A `pandas.DataFrame` with 249 rows and the following columns: `['centroid_lat', 'centroid_lon', 'car_hours', 'peak_hour']`.
Each row represents the availability of car-sharing services near the centroid of a zone in Montreal over a month-long period.
def carshare(): """ Each row represents the availability of car-sharing services near the centroid of a zone in Montreal over a month-long period. Returns: A `pandas.DataFrame` with 249 rows and the following columns: `['centroid_lat', 'centroid_lon', 'car_hours', 'peak_hour']`. """ return _get_dataset("carshare")
[ "def", "carshare", "(", ")", ":", "return", "_get_dataset", "(", "\"carshare\"", ")" ]
[ 92, 0 ]
[ 101, 35 ]
python
en
['en', 'error', 'th']
False
stocks
(indexed=False)
Each row in this wide dataset represents closing prices from 6 tech stocks in 2018/2019. Returns: A `pandas.DataFrame` with 100 rows and the following columns: `['date', 'GOOG', 'AAPL', 'AMZN', 'FB', 'NFLX', 'MSFT']`. If `indexed` is True, the 'date' column is used as the index and the column index is named 'company'
Each row in this wide dataset represents closing prices from 6 tech stocks in 2018/2019.
def stocks(indexed=False): """ Each row in this wide dataset represents closing prices from 6 tech stocks in 2018/2019. Returns: A `pandas.DataFrame` with 100 rows and the following columns: `['date', 'GOOG', 'AAPL', 'AMZN', 'FB', 'NFLX', 'MSFT']`. If `indexed` is True, the 'date' column is used as the index and the column index is named 'company' """ df = _get_dataset("stocks") if indexed: df = df.set_index("date") df.columns.name = "company" return df
[ "def", "stocks", "(", "indexed", "=", "False", ")", ":", "df", "=", "_get_dataset", "(", "\"stocks\"", ")", "if", "indexed", ":", "df", "=", "df", ".", "set_index", "(", "\"date\"", ")", "df", ".", "columns", ".", "name", "=", "\"company\"", "return", "df" ]
[ 104, 0 ]
[ 118, 13 ]
python
en
['en', 'error', 'th']
False
experiment
(indexed=False)
Each row in this wide dataset represents the results of 100 simulated participants on three hypothetical experiments, along with their gender and control/treatment group. Returns: A `pandas.DataFrame` with 100 rows and the following columns: `['experiment_1', 'experiment_2', 'experiment_3', 'gender', 'group']`. If `indexed` is True, the data frame index is named "participant"
Each row in this wide dataset represents the results of 100 simulated participants on three hypothetical experiments, along with their gender and control/treatment group.
def experiment(indexed=False): """ Each row in this wide dataset represents the results of 100 simulated participants on three hypothetical experiments, along with their gender and control/treatment group. Returns: A `pandas.DataFrame` with 100 rows and the following columns: `['experiment_1', 'experiment_2', 'experiment_3', 'gender', 'group']`. If `indexed` is True, the data frame index is named "participant" """ df = _get_dataset("experiment") if indexed: df.index.name = "participant" return df
[ "def", "experiment", "(", "indexed", "=", "False", ")", ":", "df", "=", "_get_dataset", "(", "\"experiment\"", ")", "if", "indexed", ":", "df", ".", "index", ".", "name", "=", "\"participant\"", "return", "df" ]
[ 121, 0 ]
[ 135, 13 ]
python
en
['en', 'error', 'th']
False
medals_wide
(indexed=False)
This dataset represents the medal table for Olympic Short Track Speed Skating for the top three nations as of 2020. Returns: A `pandas.DataFrame` with 3 rows and the following columns: `['nation', 'gold', 'silver', 'bronze']`. If `indexed` is True, the 'nation' column is used as the index and the column index is named 'medal'
This dataset represents the medal table for Olympic Short Track Speed Skating for the top three nations as of 2020.
def medals_wide(indexed=False): """ This dataset represents the medal table for Olympic Short Track Speed Skating for the top three nations as of 2020. Returns: A `pandas.DataFrame` with 3 rows and the following columns: `['nation', 'gold', 'silver', 'bronze']`. If `indexed` is True, the 'nation' column is used as the index and the column index is named 'medal' """ df = _get_dataset("medals") if indexed: df = df.set_index("nation") df.columns.name = "medal" return df
[ "def", "medals_wide", "(", "indexed", "=", "False", ")", ":", "df", "=", "_get_dataset", "(", "\"medals\"", ")", "if", "indexed", ":", "df", "=", "df", ".", "set_index", "(", "\"nation\"", ")", "df", ".", "columns", ".", "name", "=", "\"medal\"", "return", "df" ]
[ 138, 0 ]
[ 153, 13 ]
python
en
['en', 'error', 'th']
False
medals_long
(indexed=False)
This dataset represents the medal table for Olympic Short Track Speed Skating for the top three nations as of 2020. Returns: A `pandas.DataFrame` with 9 rows and the following columns: `['nation', 'medal', 'count']`. If `indexed` is True, the 'nation' column is used as the index.
This dataset represents the medal table for Olympic Short Track Speed Skating for the top three nations as of 2020.
def medals_long(indexed=False): """ This dataset represents the medal table for Olympic Short Track Speed Skating for the top three nations as of 2020. Returns: A `pandas.DataFrame` with 9 rows and the following columns: `['nation', 'medal', 'count']`. If `indexed` is True, the 'nation' column is used as the index. """ df = _get_dataset("medals").melt( id_vars=["nation"], value_name="count", var_name="medal" ) if indexed: df = df.set_index("nation") return df
[ "def", "medals_long", "(", "indexed", "=", "False", ")", ":", "df", "=", "_get_dataset", "(", "\"medals\"", ")", ".", "melt", "(", "id_vars", "=", "[", "\"nation\"", "]", ",", "value_name", "=", "\"count\"", ",", "var_name", "=", "\"medal\"", ")", "if", "indexed", ":", "df", "=", "df", ".", "set_index", "(", "\"nation\"", ")", "return", "df" ]
[ 156, 0 ]
[ 171, 13 ]
python
en
['en', 'error', 'th']
False
Z.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\"", "]" ]
[ 27, 4 ]
[ 77, 28 ]
python
en
['en', 'error', 'th']
False
Z.end
(self)
Sets the end contour level value. Must be more than `contours.start` The 'end' property is a number and may be specified as: - An int or float Returns ------- int|float
Sets the end contour level value. Must be more than `contours.start` The 'end' property is a number and may be specified as: - An int or float
def end(self): """ Sets the end contour level value. Must be more than `contours.start` The 'end' property is a number and may be specified as: - An int or float Returns ------- int|float """ return self["end"]
[ "def", "end", "(", "self", ")", ":", "return", "self", "[", "\"end\"", "]" ]
[ 86, 4 ]
[ 98, 26 ]
python
en
['en', 'error', 'th']
False
Z.highlight
(self)
Determines whether or not contour lines about the z dimension are highlighted on hover. The 'highlight' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not contour lines about the z dimension are highlighted on hover. The 'highlight' property must be specified as a bool (either True, or False)
def highlight(self): """ Determines whether or not contour lines about the z dimension are highlighted on hover. The 'highlight' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["highlight"]
[ "def", "highlight", "(", "self", ")", ":", "return", "self", "[", "\"highlight\"", "]" ]
[ 107, 4 ]
[ 119, 32 ]
python
en
['en', 'error', 'th']
False
Z.highlightcolor
(self)
Sets the color of the highlighted contour lines. The 'highlightcolor' 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 highlighted contour lines. The 'highlightcolor' 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 highlightcolor(self): """ Sets the color of the highlighted contour lines. The 'highlightcolor' 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["highlightcolor"]
[ "def", "highlightcolor", "(", "self", ")", ":", "return", "self", "[", "\"highlightcolor\"", "]" ]
[ 128, 4 ]
[ 178, 37 ]
python
en
['en', 'error', 'th']
False
Z.highlightwidth
(self)
Sets the width of the highlighted contour lines. The 'highlightwidth' 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 highlighted contour lines. The 'highlightwidth' property is a number and may be specified as: - An int or float in the interval [1, 16]
def highlightwidth(self): """ Sets the width of the highlighted contour lines. The 'highlightwidth' property is a number and may be specified as: - An int or float in the interval [1, 16] Returns ------- int|float """ return self["highlightwidth"]
[ "def", "highlightwidth", "(", "self", ")", ":", "return", "self", "[", "\"highlightwidth\"", "]" ]
[ 187, 4 ]
[ 198, 37 ]
python
en
['en', 'error', 'th']
False
Z.project
(self)
The 'project' property is an instance of Project that may be specified as: - An instance of :class:`plotly.graph_objs.surface.contours.z.Project` - A dict of string/value properties that will be passed to the Project constructor Supported dict properties: x Determines whether or not these contour lines are projected on the x plane. If `highlight` is set to True (the default), the projected lines are shown on hover. If `show` is set to True, the projected lines are shown in permanence. y Determines whether or not these contour lines are projected on the y plane. If `highlight` is set to True (the default), the projected lines are shown on hover. If `show` is set to True, the projected lines are shown in permanence. z Determines whether or not these contour lines are projected on the z plane. If `highlight` is set to True (the default), the projected lines are shown on hover. If `show` is set to True, the projected lines are shown in permanence. Returns ------- plotly.graph_objs.surface.contours.z.Project
The 'project' property is an instance of Project that may be specified as: - An instance of :class:`plotly.graph_objs.surface.contours.z.Project` - A dict of string/value properties that will be passed to the Project constructor Supported dict properties: x Determines whether or not these contour lines are projected on the x plane. If `highlight` is set to True (the default), the projected lines are shown on hover. If `show` is set to True, the projected lines are shown in permanence. y Determines whether or not these contour lines are projected on the y plane. If `highlight` is set to True (the default), the projected lines are shown on hover. If `show` is set to True, the projected lines are shown in permanence. z Determines whether or not these contour lines are projected on the z plane. If `highlight` is set to True (the default), the projected lines are shown on hover. If `show` is set to True, the projected lines are shown in permanence.
def project(self): """ The 'project' property is an instance of Project that may be specified as: - An instance of :class:`plotly.graph_objs.surface.contours.z.Project` - A dict of string/value properties that will be passed to the Project constructor Supported dict properties: x Determines whether or not these contour lines are projected on the x plane. If `highlight` is set to True (the default), the projected lines are shown on hover. If `show` is set to True, the projected lines are shown in permanence. y Determines whether or not these contour lines are projected on the y plane. If `highlight` is set to True (the default), the projected lines are shown on hover. If `show` is set to True, the projected lines are shown in permanence. z Determines whether or not these contour lines are projected on the z plane. If `highlight` is set to True (the default), the projected lines are shown on hover. If `show` is set to True, the projected lines are shown in permanence. Returns ------- plotly.graph_objs.surface.contours.z.Project """ return self["project"]
[ "def", "project", "(", "self", ")", ":", "return", "self", "[", "\"project\"", "]" ]
[ 207, 4 ]
[ 240, 30 ]
python
en
['en', 'error', 'th']
False
Z.show
(self)
Determines whether or not contour lines about the z dimension are drawn. The 'show' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not contour lines about the z dimension are drawn. The 'show' property must be specified as a bool (either True, or False)
def show(self): """ Determines whether or not contour lines about the z dimension are drawn. The 'show' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["show"]
[ "def", "show", "(", "self", ")", ":", "return", "self", "[", "\"show\"", "]" ]
[ 249, 4 ]
[ 261, 27 ]
python
en
['en', 'error', 'th']
False
Z.size
(self)
Sets the step between each contour level. Must be positive. The 'size' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the step between each contour level. Must be positive. The 'size' property is a number and may be specified as: - An int or float in the interval [0, inf]
def size(self): """ Sets the step between each contour level. Must be positive. The 'size' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 270, 4 ]
[ 281, 27 ]
python
en
['en', 'error', 'th']
False
Z.start
(self)
Sets the starting contour level value. Must be less than `contours.end` The 'start' property is a number and may be specified as: - An int or float Returns ------- int|float
Sets the starting contour level value. Must be less than `contours.end` The 'start' property is a number and may be specified as: - An int or float
def start(self): """ Sets the starting contour level value. Must be less than `contours.end` The 'start' property is a number and may be specified as: - An int or float Returns ------- int|float """ return self["start"]
[ "def", "start", "(", "self", ")", ":", "return", "self", "[", "\"start\"", "]" ]
[ 290, 4 ]
[ 302, 28 ]
python
en
['en', 'error', 'th']
False
Z.usecolormap
(self)
An alternate to "color". Determines whether or not the contour lines are colored using the trace "colorscale". The 'usecolormap' property must be specified as a bool (either True, or False) Returns ------- bool
An alternate to "color". Determines whether or not the contour lines are colored using the trace "colorscale". The 'usecolormap' property must be specified as a bool (either True, or False)
def usecolormap(self): """ An alternate to "color". Determines whether or not the contour lines are colored using the trace "colorscale". The 'usecolormap' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["usecolormap"]
[ "def", "usecolormap", "(", "self", ")", ":", "return", "self", "[", "\"usecolormap\"", "]" ]
[ 311, 4 ]
[ 323, 34 ]
python
en
['en', 'error', 'th']
False
Z.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\"", "]" ]
[ 332, 4 ]
[ 343, 28 ]
python
en
['en', 'error', 'th']
False
Z.__init__
( self, arg=None, color=None, end=None, highlight=None, highlightcolor=None, highlightwidth=None, project=None, show=None, size=None, start=None, usecolormap=None, width=None, **kwargs )
Construct a new Z object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.surface.contours.Z` color Sets the color of the contour lines. end Sets the end contour level value. Must be more than `contours.start` highlight Determines whether or not contour lines about the z dimension are highlighted on hover. highlightcolor Sets the color of the highlighted contour lines. highlightwidth Sets the width of the highlighted contour lines. project :class:`plotly.graph_objects.surface.contours.z.Project ` instance or dict with compatible properties show Determines whether or not contour lines about the z dimension are drawn. size Sets the step between each contour level. Must be positive. start Sets the starting contour level value. Must be less than `contours.end` usecolormap An alternate to "color". Determines whether or not the contour lines are colored using the trace "colorscale". width Sets the width of the contour lines. Returns ------- Z
Construct a new Z object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.surface.contours.Z` color Sets the color of the contour lines. end Sets the end contour level value. Must be more than `contours.start` highlight Determines whether or not contour lines about the z dimension are highlighted on hover. highlightcolor Sets the color of the highlighted contour lines. highlightwidth Sets the width of the highlighted contour lines. project :class:`plotly.graph_objects.surface.contours.z.Project ` instance or dict with compatible properties show Determines whether or not contour lines about the z dimension are drawn. size Sets the step between each contour level. Must be positive. start Sets the starting contour level value. Must be less than `contours.end` usecolormap An alternate to "color". Determines whether or not the contour lines are colored using the trace "colorscale". width Sets the width of the contour lines.
def __init__( self, arg=None, color=None, end=None, highlight=None, highlightcolor=None, highlightwidth=None, project=None, show=None, size=None, start=None, usecolormap=None, width=None, **kwargs ): """ Construct a new Z object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.surface.contours.Z` color Sets the color of the contour lines. end Sets the end contour level value. Must be more than `contours.start` highlight Determines whether or not contour lines about the z dimension are highlighted on hover. highlightcolor Sets the color of the highlighted contour lines. highlightwidth Sets the width of the highlighted contour lines. project :class:`plotly.graph_objects.surface.contours.z.Project ` instance or dict with compatible properties show Determines whether or not contour lines about the z dimension are drawn. size Sets the step between each contour level. Must be positive. start Sets the starting contour level value. Must be less than `contours.end` usecolormap An alternate to "color". Determines whether or not the contour lines are colored using the trace "colorscale". width Sets the width of the contour lines. Returns ------- Z """ super(Z, self).__init__("z") 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.surface.contours.Z constructor must be a dict or an instance of :class:`plotly.graph_objs.surface.contours.Z`""" ) # 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("end", None) _v = end if end is not None else _v if _v is not None: self["end"] = _v _v = arg.pop("highlight", None) _v = highlight if highlight is not None else _v if _v is not None: self["highlight"] = _v _v = arg.pop("highlightcolor", None) _v = highlightcolor if highlightcolor is not None else _v if _v is not None: self["highlightcolor"] = _v _v = arg.pop("highlightwidth", None) _v = highlightwidth if highlightwidth is not None else _v if _v is not None: self["highlightwidth"] = _v _v = arg.pop("project", None) _v = project if project is not None else _v if _v is not None: self["project"] = _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("size", None) _v = size if size is not None else _v if _v is not None: self["size"] = _v _v = arg.pop("start", None) _v = start if start is not None else _v if _v is not None: self["start"] = _v _v = arg.pop("usecolormap", None) _v = usecolormap if usecolormap is not None else _v if _v is not None: self["usecolormap"] = _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", ",", "end", "=", "None", ",", "highlight", "=", "None", ",", "highlightcolor", "=", "None", ",", "highlightwidth", "=", "None", ",", "project", "=", "None", ",", "show", "=", "None", ",", "size", "=", "None", ",", "start", "=", "None", ",", "usecolormap", "=", "None", ",", "width", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Z", ",", "self", ")", ".", "__init__", "(", "\"z\"", ")", "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.surface.contours.Z \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.surface.contours.Z`\"\"\"", ")", "# 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", "(", "\"end\"", ",", "None", ")", "_v", "=", "end", "if", "end", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"end\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"highlight\"", ",", "None", ")", "_v", "=", "highlight", "if", "highlight", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"highlight\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"highlightcolor\"", ",", "None", ")", "_v", "=", "highlightcolor", "if", "highlightcolor", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"highlightcolor\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"highlightwidth\"", ",", "None", ")", "_v", "=", "highlightwidth", "if", "highlightwidth", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"highlightwidth\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"project\"", ",", "None", ")", "_v", "=", "project", "if", "project", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"project\"", "]", "=", "_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", "(", "\"size\"", ",", "None", ")", "_v", "=", "size", "if", "size", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"size\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"start\"", ",", "None", ")", "_v", "=", "start", "if", "start", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"start\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"usecolormap\"", ",", "None", ")", "_v", "=", "usecolormap", "if", "usecolormap", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"usecolormap\"", "]", "=", "_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" ]
[ 385, 4 ]
[ 524, 34 ]
python
en
['en', 'error', 'th']
False
test_committed
()
Check that it is possible to set and get committed items
Check that it is possible to set and get committed items
def test_committed(): """ Check that it is possible to set and get committed items """ cache = make_idr_cache() cache.set(identifier, *committed_items) real_items = cache.get(identifier) assert committed_items == real_items real_items = cache.get(identifier, isCommitted=False) assert committed_items == real_items
[ "def", "test_committed", "(", ")", ":", "cache", "=", "make_idr_cache", "(", ")", "cache", ".", "set", "(", "identifier", ",", "*", "committed_items", ")", "real_items", "=", "cache", ".", "get", "(", "identifier", ")", "assert", "committed_items", "==", "real_items", "real_items", "=", "cache", ".", "get", "(", "identifier", ",", "isCommitted", "=", "False", ")", "assert", "committed_items", "==", "real_items" ]
[ 23, 0 ]
[ 32, 40 ]
python
en
['en', 'error', 'th']
False
test_uncommitted
()
Check that it is possible to set and get uncommitted items
Check that it is possible to set and get uncommitted items
def test_uncommitted(): """ Check that it is possible to set and get uncommitted items """ cache = make_idr_cache() cache.set(identifier, *uncommitted_items, isCommitted=False) real_items = cache.get(identifier, isCommitted=False) assert uncommitted_items == real_items
[ "def", "test_uncommitted", "(", ")", ":", "cache", "=", "make_idr_cache", "(", ")", "cache", ".", "set", "(", "identifier", ",", "*", "uncommitted_items", ",", "isCommitted", "=", "False", ")", "real_items", "=", "cache", ".", "get", "(", "identifier", ",", "isCommitted", "=", "False", ")", "assert", "uncommitted_items", "==", "real_items" ]
[ 35, 0 ]
[ 42, 42 ]
python
en
['en', 'error', 'th']
False
test_committed_and_uncommitted
()
Check that uncommitted and committed can present together
Check that uncommitted and committed can present together
def test_committed_and_uncommitted(): """ Check that uncommitted and committed can present together """ cache = make_idr_cache() cache.set(identifier, *committed_items, isCommitted=True) cache.set(identifier, *uncommitted_items, isCommitted=False) assert uncommitted_items == cache.get(identifier, isCommitted=False) assert committed_items == cache.get(identifier, isCommitted=True)
[ "def", "test_committed_and_uncommitted", "(", ")", ":", "cache", "=", "make_idr_cache", "(", ")", "cache", ".", "set", "(", "identifier", ",", "*", "committed_items", ",", "isCommitted", "=", "True", ")", "cache", ".", "set", "(", "identifier", ",", "*", "uncommitted_items", ",", "isCommitted", "=", "False", ")", "assert", "uncommitted_items", "==", "cache", ".", "get", "(", "identifier", ",", "isCommitted", "=", "False", ")", "assert", "committed_items", "==", "cache", ".", "get", "(", "identifier", ",", "isCommitted", "=", "True", ")" ]
[ 45, 0 ]
[ 53, 69 ]
python
en
['en', 'error', 'th']
False
to_json
(fig, validate=True, pretty=False, remove_uids=True)
Convert a figure to a JSON string representation Parameters ---------- fig: Figure object or dict representing a figure validate: bool (default True) True if the figure should be validated before being converted to JSON, False otherwise. pretty: bool (default False) True if JSON representation should be pretty-printed, False if representation should be as compact as possible. remove_uids: bool (default True) True if trace UIDs should be omitted from the JSON representation Returns ------- str Representation of figure as a JSON string
Convert a figure to a JSON string representation
def to_json(fig, validate=True, pretty=False, remove_uids=True): """ Convert a figure to a JSON string representation Parameters ---------- fig: Figure object or dict representing a figure validate: bool (default True) True if the figure should be validated before being converted to JSON, False otherwise. pretty: bool (default False) True if JSON representation should be pretty-printed, False if representation should be as compact as possible. remove_uids: bool (default True) True if trace UIDs should be omitted from the JSON representation Returns ------- str Representation of figure as a JSON string """ from _plotly_utils.utils import PlotlyJSONEncoder # Validate figure # --------------- fig_dict = validate_coerce_fig_to_dict(fig, validate) # Remove trace uid # ---------------- if remove_uids: for trace in fig_dict.get("data", []): trace.pop("uid", None) # Dump to a JSON string and return # -------------------------------- opts = {"sort_keys": True} if pretty: opts["indent"] = 2 else: # Remove all whitespace opts["separators"] = (",", ":") return json.dumps(fig_dict, cls=PlotlyJSONEncoder, **opts)
[ "def", "to_json", "(", "fig", ",", "validate", "=", "True", ",", "pretty", "=", "False", ",", "remove_uids", "=", "True", ")", ":", "from", "_plotly_utils", ".", "utils", "import", "PlotlyJSONEncoder", "# Validate figure", "# ---------------", "fig_dict", "=", "validate_coerce_fig_to_dict", "(", "fig", ",", "validate", ")", "# Remove trace uid", "# ----------------", "if", "remove_uids", ":", "for", "trace", "in", "fig_dict", ".", "get", "(", "\"data\"", ",", "[", "]", ")", ":", "trace", ".", "pop", "(", "\"uid\"", ",", "None", ")", "# Dump to a JSON string and return", "# --------------------------------", "opts", "=", "{", "\"sort_keys\"", ":", "True", "}", "if", "pretty", ":", "opts", "[", "\"indent\"", "]", "=", "2", "else", ":", "# Remove all whitespace", "opts", "[", "\"separators\"", "]", "=", "(", "\",\"", ",", "\":\"", ")", "return", "json", ".", "dumps", "(", "fig_dict", ",", "cls", "=", "PlotlyJSONEncoder", ",", "*", "*", "opts", ")" ]
[ 9, 0 ]
[ 55, 62 ]
python
en
['en', 'error', 'th']
False
write_json
(fig, file, validate=True, pretty=False, remove_uids=True)
Convert a figure to JSON and write it to a file or writeable object Parameters ---------- fig: Figure object or dict representing a figure file: str or writeable A string representing a local file path or a writeable object (e.g. an open file descriptor) pretty: bool (default False) True if JSON representation should be pretty-printed, False if representation should be as compact as possible. remove_uids: bool (default True) True if trace UIDs should be omitted from the JSON representation Returns ------- None
Convert a figure to JSON and write it to a file or writeable object
def write_json(fig, file, validate=True, pretty=False, remove_uids=True): """ Convert a figure to JSON and write it to a file or writeable object Parameters ---------- fig: Figure object or dict representing a figure file: str or writeable A string representing a local file path or a writeable object (e.g. an open file descriptor) pretty: bool (default False) True if JSON representation should be pretty-printed, False if representation should be as compact as possible. remove_uids: bool (default True) True if trace UIDs should be omitted from the JSON representation Returns ------- None """ # Get JSON string # --------------- # Pass through validate argument and let to_json handle validation logic json_str = to_json(fig, validate=validate, pretty=pretty, remove_uids=remove_uids) # Check if file is a string # ------------------------- file_is_str = isinstance(file, string_types) # Open file # --------- if file_is_str: with open(file, "w") as f: f.write(json_str) else: file.write(json_str)
[ "def", "write_json", "(", "fig", ",", "file", ",", "validate", "=", "True", ",", "pretty", "=", "False", ",", "remove_uids", "=", "True", ")", ":", "# Get JSON string", "# ---------------", "# Pass through validate argument and let to_json handle validation logic", "json_str", "=", "to_json", "(", "fig", ",", "validate", "=", "validate", ",", "pretty", "=", "pretty", ",", "remove_uids", "=", "remove_uids", ")", "# Check if file is a string", "# -------------------------", "file_is_str", "=", "isinstance", "(", "file", ",", "string_types", ")", "# Open file", "# ---------", "if", "file_is_str", ":", "with", "open", "(", "file", ",", "\"w\"", ")", "as", "f", ":", "f", ".", "write", "(", "json_str", ")", "else", ":", "file", ".", "write", "(", "json_str", ")" ]
[ 58, 0 ]
[ 99, 28 ]
python
en
['en', 'error', 'th']
False
from_json
(value, output_type="Figure", skip_invalid=False)
Construct a figure from a JSON string Parameters ---------- value: str String containing the JSON representation of a figure output_type: type or str (default 'Figure') The output figure type or type name. One of: graph_objs.Figure, 'Figure', graph_objs.FigureWidget, 'FigureWidget' skip_invalid: bool (default False) False if invalid figure properties should result in an exception. True if invalid figure properties should be silently ignored. Raises ------ ValueError if value is not a string, or if skip_invalid=False and value contains invalid figure properties Returns ------- Figure or FigureWidget
Construct a figure from a JSON string
def from_json(value, output_type="Figure", skip_invalid=False): """ Construct a figure from a JSON string Parameters ---------- value: str String containing the JSON representation of a figure output_type: type or str (default 'Figure') The output figure type or type name. One of: graph_objs.Figure, 'Figure', graph_objs.FigureWidget, 'FigureWidget' skip_invalid: bool (default False) False if invalid figure properties should result in an exception. True if invalid figure properties should be silently ignored. Raises ------ ValueError if value is not a string, or if skip_invalid=False and value contains invalid figure properties Returns ------- Figure or FigureWidget """ # Validate value # -------------- if not isinstance(value, string_types): raise ValueError( """ from_json requires a string argument but received value of type {typ} Received value: {value}""".format( typ=type(value), value=value ) ) # Decode JSON # ----------- fig_dict = json.loads(value) # Validate coerce output type # --------------------------- cls = validate_coerce_output_type(output_type) # Create and return figure # ------------------------ fig = cls(fig_dict, skip_invalid=skip_invalid) return fig
[ "def", "from_json", "(", "value", ",", "output_type", "=", "\"Figure\"", ",", "skip_invalid", "=", "False", ")", ":", "# Validate value", "# --------------", "if", "not", "isinstance", "(", "value", ",", "string_types", ")", ":", "raise", "ValueError", "(", "\"\"\"\nfrom_json requires a string argument but received value of type {typ}\n Received value: {value}\"\"\"", ".", "format", "(", "typ", "=", "type", "(", "value", ")", ",", "value", "=", "value", ")", ")", "# Decode JSON", "# -----------", "fig_dict", "=", "json", ".", "loads", "(", "value", ")", "# Validate coerce output type", "# ---------------------------", "cls", "=", "validate_coerce_output_type", "(", "output_type", ")", "# Create and return figure", "# ------------------------", "fig", "=", "cls", "(", "fig_dict", ",", "skip_invalid", "=", "skip_invalid", ")", "return", "fig" ]
[ 102, 0 ]
[ 152, 14 ]
python
en
['en', 'error', 'th']
False
read_json
(file, output_type="Figure", skip_invalid=False)
Construct a figure from the JSON contents of a local file or readable Python object Parameters ---------- file: str or readable A string containing the path to a local file or a read-able Python object (e.g. an open file descriptor) output_type: type or str (default 'Figure') The output figure type or type name. One of: graph_objs.Figure, 'Figure', graph_objs.FigureWidget, 'FigureWidget' skip_invalid: bool (default False) False if invalid figure properties should result in an exception. True if invalid figure properties should be silently ignored. Returns ------- Figure or FigureWidget
Construct a figure from the JSON contents of a local file or readable Python object
def read_json(file, output_type="Figure", skip_invalid=False): """ Construct a figure from the JSON contents of a local file or readable Python object Parameters ---------- file: str or readable A string containing the path to a local file or a read-able Python object (e.g. an open file descriptor) output_type: type or str (default 'Figure') The output figure type or type name. One of: graph_objs.Figure, 'Figure', graph_objs.FigureWidget, 'FigureWidget' skip_invalid: bool (default False) False if invalid figure properties should result in an exception. True if invalid figure properties should be silently ignored. Returns ------- Figure or FigureWidget """ # Check if file is a string # ------------------------- # If it's a string we assume it's a local file path. If it's not a string # then we assume it's a read-able Python object file_is_str = isinstance(file, string_types) # Read file contents into JSON string # ----------------------------------- if file_is_str: with open(file, "r") as f: json_str = f.read() else: json_str = file.read() # Construct and return figure # --------------------------- return from_json(json_str, skip_invalid=skip_invalid, output_type=output_type)
[ "def", "read_json", "(", "file", ",", "output_type", "=", "\"Figure\"", ",", "skip_invalid", "=", "False", ")", ":", "# Check if file is a string", "# -------------------------", "# If it's a string we assume it's a local file path. If it's not a string", "# then we assume it's a read-able Python object", "file_is_str", "=", "isinstance", "(", "file", ",", "string_types", ")", "# Read file contents into JSON string", "# -----------------------------------", "if", "file_is_str", ":", "with", "open", "(", "file", ",", "\"r\"", ")", "as", "f", ":", "json_str", "=", "f", ".", "read", "(", ")", "else", ":", "json_str", "=", "file", ".", "read", "(", ")", "# Construct and return figure", "# ---------------------------", "return", "from_json", "(", "json_str", ",", "skip_invalid", "=", "skip_invalid", ",", "output_type", "=", "output_type", ")" ]
[ 155, 0 ]
[ 195, 82 ]
python
en
['en', 'error', 'th']
False
setup
(bot)
Mandatory function to add the Cog to the bot.
Mandatory function to add the Cog to the bot.
def setup(bot): """ Mandatory function to add the Cog to the bot. """ bot.add_cog(TranslateCog(bot))
[ "def", "setup", "(", "bot", ")", ":", "bot", ".", "add_cog", "(", "TranslateCog", "(", "bot", ")", ")" ]
[ 325, 0 ]
[ 329, 34 ]
python
en
['en', 'error', 'th']
False
TranslateCog.emoji_translate_listener
(self, payload)
Translates a Message when you add a Flag Emoji to it. The flag emoji represents the language you want the message translated to. The translated message is then send to you via DM.
Translates a Message when you add a Flag Emoji to it. The flag emoji represents the language you want the message translated to. The translated message is then send to you via DM.
async def emoji_translate_listener(self, payload): """ Translates a Message when you add a Flag Emoji to it. The flag emoji represents the language you want the message translated to. The translated message is then send to you via DM. """ if self.completely_ready is False: return if await self._emoji_translate_checks(payload) is False: return channel = self.bot.get_channel(payload.channel_id) try: message = await channel.fetch_message(payload.message_id) except discord.errors.NotFound: return country_code = self.language_emoji_map.get(normalize_emoji(payload.emoji.name)) if message.embeds != []: log.debug('translating embed') await self.translate_embed(payload.member, channel, message, message.embeds[0], country_code) return translated = self.translator.translate(text=message.content, dest=country_code, src="auto") # TODO: Make embed with Hyperlink await payload.member.send(f"{message.jump_url}\n**in {LANGUAGES.get(country_code)}:**\n {translated.text.strip('.')}", allowed_mentions=AllowedMentions.none())
[ "async", "def", "emoji_translate_listener", "(", "self", ",", "payload", ")", ":", "if", "self", ".", "completely_ready", "is", "False", ":", "return", "if", "await", "self", ".", "_emoji_translate_checks", "(", "payload", ")", "is", "False", ":", "return", "channel", "=", "self", ".", "bot", ".", "get_channel", "(", "payload", ".", "channel_id", ")", "try", ":", "message", "=", "await", "channel", ".", "fetch_message", "(", "payload", ".", "message_id", ")", "except", "discord", ".", "errors", ".", "NotFound", ":", "return", "country_code", "=", "self", ".", "language_emoji_map", ".", "get", "(", "normalize_emoji", "(", "payload", ".", "emoji", ".", "name", ")", ")", "if", "message", ".", "embeds", "!=", "[", "]", ":", "log", ".", "debug", "(", "'translating embed'", ")", "await", "self", ".", "translate_embed", "(", "payload", ".", "member", ",", "channel", ",", "message", ",", "message", ".", "embeds", "[", "0", "]", ",", "country_code", ")", "return", "translated", "=", "self", ".", "translator", ".", "translate", "(", "text", "=", "message", ".", "content", ",", "dest", "=", "country_code", ",", "src", "=", "\"auto\"", ")", "# TODO: Make embed with Hyperlink", "await", "payload", ".", "member", ".", "send", "(", "f\"{message.jump_url}\\n**in {LANGUAGES.get(country_code)}:**\\n {translated.text.strip('.')}\"", ",", "allowed_mentions", "=", "AllowedMentions", ".", "none", "(", ")", ")" ]
[ 182, 4 ]
[ 207, 167 ]
python
en
['en', 'error', 'th']
False
TranslateCog.translate
(self, ctx, to_language_id: Optional[LanguageConverter] = "english", *, text_to_translate: str)
Translates text into multiple different languages. Tries to auto-guess input language. Args: text_to_translate (str): the text to translate, quotes are optional to_language_id (Optional[LanguageConverter], optional): either can be the name of the language or an language code (iso639-1 language codes). Defaults to "english". Example: @AntiPetros translate german This is the Sentence to translate Info: Your invoking message gets deleted!
Translates text into multiple different languages.
async def translate(self, ctx, to_language_id: Optional[LanguageConverter] = "english", *, text_to_translate: str): """ Translates text into multiple different languages. Tries to auto-guess input language. Args: text_to_translate (str): the text to translate, quotes are optional to_language_id (Optional[LanguageConverter], optional): either can be the name of the language or an language code (iso639-1 language codes). Defaults to "english". Example: @AntiPetros translate german This is the Sentence to translate Info: Your invoking message gets deleted! """ translated = self.translator.translate(text=text_to_translate, dest=to_language_id, src="auto") await ctx.send(f"__from {ctx.author.display_name}:__ *{translated.text}*") await ctx.message.delete()
[ "async", "def", "translate", "(", "self", ",", "ctx", ",", "to_language_id", ":", "Optional", "[", "LanguageConverter", "]", "=", "\"english\"", ",", "*", ",", "text_to_translate", ":", "str", ")", ":", "translated", "=", "self", ".", "translator", ".", "translate", "(", "text", "=", "text_to_translate", ",", "dest", "=", "to_language_id", ",", "src", "=", "\"auto\"", ")", "await", "ctx", ".", "send", "(", "f\"__from {ctx.author.display_name}:__ *{translated.text}*\"", ")", "await", "ctx", ".", "message", ".", "delete", "(", ")" ]
[ 242, 4 ]
[ 261, 34 ]
python
en
['en', 'error', 'th']
False
TranslateCog.available_languages
(self, ctx: commands.Context)
Sends a list of all available languages, that can be used with the `translate` command. Example: @AntiPetros available_languages Info: Your invoking message gets deleted and after 120 seconds the message with the list of languages gets deleted too.
Sends a list of all available languages, that can be used with the `translate` command.
async def available_languages(self, ctx: commands.Context): """ Sends a list of all available languages, that can be used with the `translate` command. Example: @AntiPetros available_languages Info: Your invoking message gets deleted and after 120 seconds the message with the list of languages gets deleted too. """ text = ListMarker.make_list(list(LANGUAGES.values())) await ctx.send(text, delete_after=120, allowed_mentions=discord.AllowedMentions.none()) await delete_message_if_text_channel(ctx)
[ "async", "def", "available_languages", "(", "self", ",", "ctx", ":", "commands", ".", "Context", ")", ":", "text", "=", "ListMarker", ".", "make_list", "(", "list", "(", "LANGUAGES", ".", "values", "(", ")", ")", ")", "await", "ctx", ".", "send", "(", "text", ",", "delete_after", "=", "120", ",", "allowed_mentions", "=", "discord", ".", "AllowedMentions", ".", "none", "(", ")", ")", "await", "delete_message_if_text_channel", "(", "ctx", ")" ]
[ 266, 4 ]
[ 279, 49 ]
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 mapbox 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 mapbox 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 mapbox 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 mapbox 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 mapbox 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 mapbox 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 mapbox 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 mapbox 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 mapbox 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 mapbox 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 mapbox 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 mapbox 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.mapbox.Domain` column If there is a layout grid, use the domain for this column in the grid for this mapbox subplot . row If there is a layout grid, use the domain for this row in the grid for this mapbox subplot . x Sets the horizontal domain of this mapbox subplot (in plot fraction). y Sets the vertical domain of this mapbox 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.mapbox.Domain` column If there is a layout grid, use the domain for this column in the grid for this mapbox subplot . row If there is a layout grid, use the domain for this row in the grid for this mapbox subplot . x Sets the horizontal domain of this mapbox subplot (in plot fraction). y Sets the vertical domain of this mapbox 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.mapbox.Domain` column If there is a layout grid, use the domain for this column in the grid for this mapbox subplot . row If there is a layout grid, use the domain for this row in the grid for this mapbox subplot . x Sets the horizontal domain of this mapbox subplot (in plot fraction). y Sets the vertical domain of this mapbox 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.mapbox.Domain constructor must be a dict or an instance of :class:`plotly.graph_objs.layout.mapbox.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.mapbox.Domain \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.layout.mapbox.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
Title.font
(self)
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.densitymapbox.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 ------- plotly.graph_objs.densitymapbox.colorbar.title.Font
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.densitymapbox.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 font(self): """ 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.densitymapbox.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 ------- plotly.graph_objs.densitymapbox.colorbar.title.Font """ return self["font"]
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 15, 4 ]
[ 53, 27 ]
python
en
['en', 'error', 'th']
False
Title.side
(self)
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 ------- Any
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 side(self): """ 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 ------- Any """ return self["side"]
[ "def", "side", "(", "self", ")", ":", "return", "self", "[", "\"side\"", "]" ]
[ 62, 4 ]
[ 76, 27 ]
python
en
['en', 'error', 'th']
False
Title.text
(self)
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. The 'text' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
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. The 'text' property is a string and must be specified as: - A string - A number that will be converted to a string
def text(self): """ 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. The 'text' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["text"]
[ "def", "text", "(", "self", ")", ":", "return", "self", "[", "\"text\"", "]" ]
[ 85, 4 ]
[ 99, 27 ]
python
en
['en', 'error', 'th']
False
Title.__init__
(self, arg=None, font=None, side=None, text=None, **kwargs)
Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title` 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 ------- Title
Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title` 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 __init__(self, arg=None, font=None, side=None, text=None, **kwargs): """ Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title` 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 ------- Title """ super(Title, self).__init__("title") 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.densitymapbox.colorbar.Title constructor must be a dict or an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title`""" ) # 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("font", None) _v = font if font is not None else _v if _v is not None: self["font"] = _v _v = arg.pop("side", None) _v = side if side is not None else _v if _v is not None: self["side"] = _v _v = arg.pop("text", None) _v = text if text is not None else _v if _v is not None: self["text"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "font", "=", "None", ",", "side", "=", "None", ",", "text", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Title", ",", "self", ")", ".", "__init__", "(", "\"title\"", ")", "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.densitymapbox.colorbar.Title \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title`\"\"\"", ")", "# 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", "(", "\"font\"", ",", "None", ")", "_v", "=", "font", "if", "font", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"font\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"side\"", ",", "None", ")", "_v", "=", "side", "if", "side", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"side\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"text\"", ",", "None", ")", "_v", "=", "text", "if", "text", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"text\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 126, 4 ]
[ 203, 34 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bgcolor
(self)
Sets the background color of the hover label. By default uses the annotation's `bgcolor` made opaque, or white if it was transparent. 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 background color of the hover label. By default uses the annotation's `bgcolor` made opaque, or white if it was transparent. 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 background color of the hover label. By default uses the annotation's `bgcolor` made opaque, or white if it was transparent. 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\"", "]" ]
[ 15, 4 ]
[ 67, 30 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bordercolor
(self)
Sets the border color of the hover label. By default uses either dark grey or white, for maximum contrast with `hoverlabel.bgcolor`. 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 border color of the hover label. By default uses either dark grey or white, for maximum contrast with `hoverlabel.bgcolor`. 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 border color of the hover label. By default uses either dark grey or white, for maximum contrast with `hoverlabel.bgcolor`. 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\"", "]" ]
[ 76, 4 ]
[ 128, 34 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.font
(self)
Sets the hover label text font. By default uses the global hover font and size, with color from `hoverlabel.bordercolor`. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.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 ------- plotly.graph_objs.layout.annotation.hoverlabel.Font
Sets the hover label text font. By default uses the global hover font and size, with color from `hoverlabel.bordercolor`. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.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 font(self): """ Sets the hover label text font. By default uses the global hover font and size, with color from `hoverlabel.bordercolor`. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.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 ------- plotly.graph_objs.layout.annotation.hoverlabel.Font """ return self["font"]
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 137, 4 ]
[ 175, 27 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.__init__
(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs)
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel` bgcolor Sets the background color of the hover label. By default uses the annotation's `bgcolor` made opaque, or white if it was transparent. bordercolor Sets the border color of the hover label. By default uses either dark grey or white, for maximum contrast with `hoverlabel.bgcolor`. font Sets the hover label text font. By default uses the global hover font and size, with color from `hoverlabel.bordercolor`. Returns ------- Hoverlabel
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel` bgcolor Sets the background color of the hover label. By default uses the annotation's `bgcolor` made opaque, or white if it was transparent. bordercolor Sets the border color of the hover label. By default uses either dark grey or white, for maximum contrast with `hoverlabel.bgcolor`. font Sets the hover label text font. By default uses the global hover font and size, with color from `hoverlabel.bordercolor`.
def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs): """ Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel` bgcolor Sets the background color of the hover label. By default uses the annotation's `bgcolor` made opaque, or white if it was transparent. bordercolor Sets the border color of the hover label. By default uses either dark grey or white, for maximum contrast with `hoverlabel.bgcolor`. font Sets the hover label text font. By default uses the global hover font and size, with color from `hoverlabel.bordercolor`. Returns ------- Hoverlabel """ super(Hoverlabel, self).__init__("hoverlabel") 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.annotation.Hoverlabel constructor must be a dict or an instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel`""" ) # 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("font", None) _v = font if font is not None else _v if _v is not None: self["font"] = _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", ",", "font", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Hoverlabel", ",", "self", ")", ".", "__init__", "(", "\"hoverlabel\"", ")", "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.annotation.Hoverlabel \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel`\"\"\"", ")", "# 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", "(", "\"font\"", ",", "None", ")", "_v", "=", "font", "if", "font", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"font\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 200, 4 ]
[ 275, 34 ]
python
en
['en', 'error', 'th']
False
Caps.x
(self)
The 'x' property is an instance of X that may be specified as: - An instance of :class:`plotly.graph_objs.volume.caps.X` - A dict of string/value properties that will be passed to the X constructor Supported dict properties: fill Sets the fill ratio of the `caps`. The default fill value of the `caps` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. show Sets the fill ratio of the `slices`. The default fill value of the x `slices` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. Returns ------- plotly.graph_objs.volume.caps.X
The 'x' property is an instance of X that may be specified as: - An instance of :class:`plotly.graph_objs.volume.caps.X` - A dict of string/value properties that will be passed to the X constructor Supported dict properties: fill Sets the fill ratio of the `caps`. The default fill value of the `caps` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. show Sets the fill ratio of the `slices`. The default fill value of the x `slices` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges.
def x(self): """ The 'x' property is an instance of X that may be specified as: - An instance of :class:`plotly.graph_objs.volume.caps.X` - A dict of string/value properties that will be passed to the X constructor Supported dict properties: fill Sets the fill ratio of the `caps`. The default fill value of the `caps` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. show Sets the fill ratio of the `slices`. The default fill value of the x `slices` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. Returns ------- plotly.graph_objs.volume.caps.X """ return self["x"]
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 15, 4 ]
[ 43, 24 ]
python
en
['en', 'error', 'th']
False
Caps.y
(self)
The 'y' property is an instance of Y that may be specified as: - An instance of :class:`plotly.graph_objs.volume.caps.Y` - A dict of string/value properties that will be passed to the Y constructor Supported dict properties: fill Sets the fill ratio of the `caps`. The default fill value of the `caps` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. show Sets the fill ratio of the `slices`. The default fill value of the y `slices` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. Returns ------- plotly.graph_objs.volume.caps.Y
The 'y' property is an instance of Y that may be specified as: - An instance of :class:`plotly.graph_objs.volume.caps.Y` - A dict of string/value properties that will be passed to the Y constructor Supported dict properties: fill Sets the fill ratio of the `caps`. The default fill value of the `caps` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. show Sets the fill ratio of the `slices`. The default fill value of the y `slices` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges.
def y(self): """ The 'y' property is an instance of Y that may be specified as: - An instance of :class:`plotly.graph_objs.volume.caps.Y` - A dict of string/value properties that will be passed to the Y constructor Supported dict properties: fill Sets the fill ratio of the `caps`. The default fill value of the `caps` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. show Sets the fill ratio of the `slices`. The default fill value of the y `slices` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. Returns ------- plotly.graph_objs.volume.caps.Y """ return self["y"]
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 52, 4 ]
[ 80, 24 ]
python
en
['en', 'error', 'th']
False
Caps.z
(self)
The 'z' property is an instance of Z that may be specified as: - An instance of :class:`plotly.graph_objs.volume.caps.Z` - A dict of string/value properties that will be passed to the Z constructor Supported dict properties: fill Sets the fill ratio of the `caps`. The default fill value of the `caps` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. show Sets the fill ratio of the `slices`. The default fill value of the z `slices` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. Returns ------- plotly.graph_objs.volume.caps.Z
The 'z' property is an instance of Z that may be specified as: - An instance of :class:`plotly.graph_objs.volume.caps.Z` - A dict of string/value properties that will be passed to the Z constructor Supported dict properties: fill Sets the fill ratio of the `caps`. The default fill value of the `caps` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. show Sets the fill ratio of the `slices`. The default fill value of the z `slices` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges.
def z(self): """ The 'z' property is an instance of Z that may be specified as: - An instance of :class:`plotly.graph_objs.volume.caps.Z` - A dict of string/value properties that will be passed to the Z constructor Supported dict properties: fill Sets the fill ratio of the `caps`. The default fill value of the `caps` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. show Sets the fill ratio of the `slices`. The default fill value of the z `slices` is 1 meaning that they are entirely shaded. On the other hand Applying a `fill` ratio less than one would allow the creation of openings parallel to the edges. Returns ------- plotly.graph_objs.volume.caps.Z """ return self["z"]
[ "def", "z", "(", "self", ")", ":", "return", "self", "[", "\"z\"", "]" ]
[ 89, 4 ]
[ 117, 24 ]
python
en
['en', 'error', 'th']
False
Caps.__init__
(self, arg=None, x=None, y=None, z=None, **kwargs)
Construct a new Caps object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.volume.Caps` x :class:`plotly.graph_objects.volume.caps.X` instance or dict with compatible properties y :class:`plotly.graph_objects.volume.caps.Y` instance or dict with compatible properties z :class:`plotly.graph_objects.volume.caps.Z` instance or dict with compatible properties Returns ------- Caps
Construct a new Caps object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.volume.Caps` x :class:`plotly.graph_objects.volume.caps.X` instance or dict with compatible properties y :class:`plotly.graph_objects.volume.caps.Y` instance or dict with compatible properties z :class:`plotly.graph_objects.volume.caps.Z` instance or dict with compatible properties
def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): """ Construct a new Caps object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.volume.Caps` x :class:`plotly.graph_objects.volume.caps.X` instance or dict with compatible properties y :class:`plotly.graph_objects.volume.caps.Y` instance or dict with compatible properties z :class:`plotly.graph_objects.volume.caps.Z` instance or dict with compatible properties Returns ------- Caps """ super(Caps, self).__init__("caps") 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.Caps constructor must be a dict or an instance of :class:`plotly.graph_objs.volume.Caps`""" ) # 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("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 _v = arg.pop("z", None) _v = z if z is not None else _v if _v is not None: self["z"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "x", "=", "None", ",", "y", "=", "None", ",", "z", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Caps", ",", "self", ")", ".", "__init__", "(", "\"caps\"", ")", "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.Caps \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.volume.Caps`\"\"\"", ")", "# 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", "(", "\"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", "_v", "=", "arg", ".", "pop", "(", "\"z\"", ",", "None", ")", "_v", "=", "z", "if", "z", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"z\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 139, 4 ]
[ 210, 34 ]
python
en
['en', 'error', 'th']
False
ConfigLedgerAuthStrategy.get_auth_constraint
(self, action_id: str)
Find rule_id for incoming action_id and return AuthConstraint instance
Find rule_id for incoming action_id and return AuthConstraint instance
def get_auth_constraint(self, action_id: str) -> AbstractAuthConstraint: """ Find rule_id for incoming action_id and return AuthConstraint instance """ return self._find_auth_constraint(action_id, self.auth_map)
[ "def", "get_auth_constraint", "(", "self", ",", "action_id", ":", "str", ")", "->", "AbstractAuthConstraint", ":", "return", "self", ".", "_find_auth_constraint", "(", "action_id", ",", "self", ".", "auth_map", ")" ]
[ 69, 4 ]
[ 73, 67 ]
python
en
['en', 'error', 'th']
False
Marker.color
(self)
Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. 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 themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. 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 themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. 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 ]
[ 68, 28 ]
python
en
['en', 'error', 'th']
False
Marker.line
(self)
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.box.marker.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: color Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set. outliercolor Sets the border line color of the outlier sample points. Defaults to marker.color outlierwidth Sets the border line width (in px) of the outlier sample points. width Sets the width (in px) of the lines bounding the marker points. Returns ------- plotly.graph_objs.box.marker.Line
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.box.marker.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: color Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set. outliercolor Sets the border line color of the outlier sample points. Defaults to marker.color outlierwidth Sets the border line width (in px) of the outlier sample points. width Sets the width (in px) of the lines bounding the marker points.
def line(self): """ The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.box.marker.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: color Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set. outliercolor Sets the border line color of the outlier sample points. Defaults to marker.color outlierwidth Sets the border line width (in px) of the outlier sample points. width Sets the width (in px) of the lines bounding the marker points. Returns ------- plotly.graph_objs.box.marker.Line """ return self["line"]
[ "def", "line", "(", "self", ")", ":", "return", "self", "[", "\"line\"", "]" ]
[ 77, 4 ]
[ 108, 27 ]
python
en
['en', 'error', 'th']
False
Marker.opacity
(self)
Sets the marker opacity. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float
Sets the marker opacity. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1]
def opacity(self): """ Sets the marker opacity. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float """ return self["opacity"]
[ "def", "opacity", "(", "self", ")", ":", "return", "self", "[", "\"opacity\"", "]" ]
[ 117, 4 ]
[ 128, 30 ]
python
en
['en', 'error', 'th']
False
Marker.outliercolor
(self)
Sets the color of the outlier sample points. The 'outliercolor' 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 outlier sample points. The 'outliercolor' 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 outliercolor(self): """ Sets the color of the outlier sample points. The 'outliercolor' 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["outliercolor"]
[ "def", "outliercolor", "(", "self", ")", ":", "return", "self", "[", "\"outliercolor\"", "]" ]
[ 137, 4 ]
[ 187, 35 ]
python
en
['en', 'error', 'th']
False
Marker.size
(self)
Sets the marker size (in px). The 'size' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the marker size (in px). The 'size' property is a number and may be specified as: - An int or float in the interval [0, inf]
def size(self): """ Sets the marker size (in px). The 'size' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 196, 4 ]
[ 207, 27 ]
python
en
['en', 'error', 'th']
False
Marker.symbol
(self)
Sets the marker symbol type. Adding 100 is equivalent to appending "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot-open" to a symbol name. The 'symbol' property is an enumeration that may be specified as: - One of the following enumeration values: [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, 'circle-open-dot', 1, 'square', 101, 'square-open', 201, 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, 'diamond-open', 202, 'diamond-dot', 302, 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, 'triangle-up-open', 205, 'triangle-up-dot', 305, 'triangle-up-open-dot', 6, 'triangle-down', 106, 'triangle-down-open', 206, 'triangle-down-dot', 306, 'triangle-down-open-dot', 7, 'triangle-left', 107, 'triangle-left-open', 207, 'triangle-left-dot', 307, 'triangle-left-open-dot', 8, 'triangle-right', 108, 'triangle-right-open', 208, 'triangle-right-dot', 308, 'triangle-right-open-dot', 9, 'triangle-ne', 109, 'triangle-ne-open', 209, 'triangle-ne-dot', 309, 'triangle-ne-open-dot', 10, 'triangle-se', 110, 'triangle-se-open', 210, 'triangle-se-dot', 310, 'triangle-se-open-dot', 11, 'triangle-sw', 111, 'triangle-sw-open', 211, 'triangle-sw-dot', 311, 'triangle-sw-open-dot', 12, 'triangle-nw', 112, 'triangle-nw-open', 212, 'triangle-nw-dot', 312, 'triangle-nw-open-dot', 13, 'pentagon', 113, 'pentagon-open', 213, 'pentagon-dot', 313, 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', 315, 'hexagon2-open-dot', 16, 'octagon', 116, 'octagon-open', 216, 'octagon-dot', 316, 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, 'hexagram-open', 218, 'hexagram-dot', 318, 'hexagram-open-dot', 19, 'star-triangle-up', 119, 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, 'star-triangle-up-open-dot', 20, 'star-triangle-down', 120, 'star-triangle-down-open', 220, 'star-triangle-down-dot', 320, 'star-triangle-down-open-dot', 21, 'star-square', 121, 'star-square-open', 221, 'star-square-dot', 321, 'star-square-open-dot', 22, 'star-diamond', 122, 'star-diamond-open', 222, 'star-diamond-dot', 322, 'star-diamond-open-dot', 23, 'diamond-tall', 123, 'diamond-tall-open', 223, 'diamond-tall-dot', 323, 'diamond-tall-open-dot', 24, 'diamond-wide', 124, 'diamond-wide-open', 224, 'diamond-wide-dot', 324, 'diamond-wide-open-dot', 25, 'hourglass', 125, 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', 128, 'circle-x-open', 29, 'square-cross', 129, 'square-cross-open', 30, 'square-x', 130, 'square-x-open', 31, 'diamond-cross', 131, 'diamond-cross-open', 32, 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, 'y-up', 137, 'y-up-open', 38, 'y-down', 138, 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, 'line-nw-open'] Returns ------- Any
Sets the marker symbol type. Adding 100 is equivalent to appending "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot-open" to a symbol name. The 'symbol' property is an enumeration that may be specified as: - One of the following enumeration values: [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, 'circle-open-dot', 1, 'square', 101, 'square-open', 201, 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, 'diamond-open', 202, 'diamond-dot', 302, 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, 'triangle-up-open', 205, 'triangle-up-dot', 305, 'triangle-up-open-dot', 6, 'triangle-down', 106, 'triangle-down-open', 206, 'triangle-down-dot', 306, 'triangle-down-open-dot', 7, 'triangle-left', 107, 'triangle-left-open', 207, 'triangle-left-dot', 307, 'triangle-left-open-dot', 8, 'triangle-right', 108, 'triangle-right-open', 208, 'triangle-right-dot', 308, 'triangle-right-open-dot', 9, 'triangle-ne', 109, 'triangle-ne-open', 209, 'triangle-ne-dot', 309, 'triangle-ne-open-dot', 10, 'triangle-se', 110, 'triangle-se-open', 210, 'triangle-se-dot', 310, 'triangle-se-open-dot', 11, 'triangle-sw', 111, 'triangle-sw-open', 211, 'triangle-sw-dot', 311, 'triangle-sw-open-dot', 12, 'triangle-nw', 112, 'triangle-nw-open', 212, 'triangle-nw-dot', 312, 'triangle-nw-open-dot', 13, 'pentagon', 113, 'pentagon-open', 213, 'pentagon-dot', 313, 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', 315, 'hexagon2-open-dot', 16, 'octagon', 116, 'octagon-open', 216, 'octagon-dot', 316, 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, 'hexagram-open', 218, 'hexagram-dot', 318, 'hexagram-open-dot', 19, 'star-triangle-up', 119, 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, 'star-triangle-up-open-dot', 20, 'star-triangle-down', 120, 'star-triangle-down-open', 220, 'star-triangle-down-dot', 320, 'star-triangle-down-open-dot', 21, 'star-square', 121, 'star-square-open', 221, 'star-square-dot', 321, 'star-square-open-dot', 22, 'star-diamond', 122, 'star-diamond-open', 222, 'star-diamond-dot', 322, 'star-diamond-open-dot', 23, 'diamond-tall', 123, 'diamond-tall-open', 223, 'diamond-tall-dot', 323, 'diamond-tall-open-dot', 24, 'diamond-wide', 124, 'diamond-wide-open', 224, 'diamond-wide-dot', 324, 'diamond-wide-open-dot', 25, 'hourglass', 125, 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', 128, 'circle-x-open', 29, 'square-cross', 129, 'square-cross-open', 30, 'square-x', 130, 'square-x-open', 31, 'diamond-cross', 131, 'diamond-cross-open', 32, 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, 'y-up', 137, 'y-up-open', 38, 'y-down', 138, 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, 'line-nw-open']
def symbol(self): """ Sets the marker symbol type. Adding 100 is equivalent to appending "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot-open" to a symbol name. The 'symbol' property is an enumeration that may be specified as: - One of the following enumeration values: [0, 'circle', 100, 'circle-open', 200, 'circle-dot', 300, 'circle-open-dot', 1, 'square', 101, 'square-open', 201, 'square-dot', 301, 'square-open-dot', 2, 'diamond', 102, 'diamond-open', 202, 'diamond-dot', 302, 'diamond-open-dot', 3, 'cross', 103, 'cross-open', 203, 'cross-dot', 303, 'cross-open-dot', 4, 'x', 104, 'x-open', 204, 'x-dot', 304, 'x-open-dot', 5, 'triangle-up', 105, 'triangle-up-open', 205, 'triangle-up-dot', 305, 'triangle-up-open-dot', 6, 'triangle-down', 106, 'triangle-down-open', 206, 'triangle-down-dot', 306, 'triangle-down-open-dot', 7, 'triangle-left', 107, 'triangle-left-open', 207, 'triangle-left-dot', 307, 'triangle-left-open-dot', 8, 'triangle-right', 108, 'triangle-right-open', 208, 'triangle-right-dot', 308, 'triangle-right-open-dot', 9, 'triangle-ne', 109, 'triangle-ne-open', 209, 'triangle-ne-dot', 309, 'triangle-ne-open-dot', 10, 'triangle-se', 110, 'triangle-se-open', 210, 'triangle-se-dot', 310, 'triangle-se-open-dot', 11, 'triangle-sw', 111, 'triangle-sw-open', 211, 'triangle-sw-dot', 311, 'triangle-sw-open-dot', 12, 'triangle-nw', 112, 'triangle-nw-open', 212, 'triangle-nw-dot', 312, 'triangle-nw-open-dot', 13, 'pentagon', 113, 'pentagon-open', 213, 'pentagon-dot', 313, 'pentagon-open-dot', 14, 'hexagon', 114, 'hexagon-open', 214, 'hexagon-dot', 314, 'hexagon-open-dot', 15, 'hexagon2', 115, 'hexagon2-open', 215, 'hexagon2-dot', 315, 'hexagon2-open-dot', 16, 'octagon', 116, 'octagon-open', 216, 'octagon-dot', 316, 'octagon-open-dot', 17, 'star', 117, 'star-open', 217, 'star-dot', 317, 'star-open-dot', 18, 'hexagram', 118, 'hexagram-open', 218, 'hexagram-dot', 318, 'hexagram-open-dot', 19, 'star-triangle-up', 119, 'star-triangle-up-open', 219, 'star-triangle-up-dot', 319, 'star-triangle-up-open-dot', 20, 'star-triangle-down', 120, 'star-triangle-down-open', 220, 'star-triangle-down-dot', 320, 'star-triangle-down-open-dot', 21, 'star-square', 121, 'star-square-open', 221, 'star-square-dot', 321, 'star-square-open-dot', 22, 'star-diamond', 122, 'star-diamond-open', 222, 'star-diamond-dot', 322, 'star-diamond-open-dot', 23, 'diamond-tall', 123, 'diamond-tall-open', 223, 'diamond-tall-dot', 323, 'diamond-tall-open-dot', 24, 'diamond-wide', 124, 'diamond-wide-open', 224, 'diamond-wide-dot', 324, 'diamond-wide-open-dot', 25, 'hourglass', 125, 'hourglass-open', 26, 'bowtie', 126, 'bowtie-open', 27, 'circle-cross', 127, 'circle-cross-open', 28, 'circle-x', 128, 'circle-x-open', 29, 'square-cross', 129, 'square-cross-open', 30, 'square-x', 130, 'square-x-open', 31, 'diamond-cross', 131, 'diamond-cross-open', 32, 'diamond-x', 132, 'diamond-x-open', 33, 'cross-thin', 133, 'cross-thin-open', 34, 'x-thin', 134, 'x-thin-open', 35, 'asterisk', 135, 'asterisk-open', 36, 'hash', 136, 'hash-open', 236, 'hash-dot', 336, 'hash-open-dot', 37, 'y-up', 137, 'y-up-open', 38, 'y-down', 138, 'y-down-open', 39, 'y-left', 139, 'y-left-open', 40, 'y-right', 140, 'y-right-open', 41, 'line-ew', 141, 'line-ew-open', 42, 'line-ns', 142, 'line-ns-open', 43, 'line-ne', 143, 'line-ne-open', 44, 'line-nw', 144, 'line-nw-open'] Returns ------- Any """ return self["symbol"]
[ "def", "symbol", "(", "self", ")", ":", "return", "self", "[", "\"symbol\"", "]" ]
[ 216, 4 ]
[ 291, 29 ]
python
en
['en', 'error', 'th']
False
Marker.__init__
( self, arg=None, color=None, line=None, opacity=None, outliercolor=None, size=None, symbol=None, **kwargs )
Construct a new Marker object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.box.Marker` color Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. line :class:`plotly.graph_objects.box.marker.Line` instance or dict with compatible properties opacity Sets the marker opacity. outliercolor Sets the color of the outlier sample points. size Sets the marker size (in px). symbol Sets the marker symbol type. Adding 100 is equivalent to appending "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot- open" to a symbol name. Returns ------- Marker
Construct a new Marker object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.box.Marker` color Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. line :class:`plotly.graph_objects.box.marker.Line` instance or dict with compatible properties opacity Sets the marker opacity. outliercolor Sets the color of the outlier sample points. size Sets the marker size (in px). symbol Sets the marker symbol type. Adding 100 is equivalent to appending "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot- open" to a symbol name.
def __init__( self, arg=None, color=None, line=None, opacity=None, outliercolor=None, size=None, symbol=None, **kwargs ): """ Construct a new Marker object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.box.Marker` color Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set. line :class:`plotly.graph_objects.box.marker.Line` instance or dict with compatible properties opacity Sets the marker opacity. outliercolor Sets the color of the outlier sample points. size Sets the marker size (in px). symbol Sets the marker symbol type. Adding 100 is equivalent to appending "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot- open" to a symbol name. Returns ------- Marker """ super(Marker, self).__init__("marker") 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.box.Marker constructor must be a dict or an instance of :class:`plotly.graph_objs.box.Marker`""" ) # 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("line", None) _v = line if line is not None else _v if _v is not None: self["line"] = _v _v = arg.pop("opacity", None) _v = opacity if opacity is not None else _v if _v is not None: self["opacity"] = _v _v = arg.pop("outliercolor", None) _v = outliercolor if outliercolor is not None else _v if _v is not None: self["outliercolor"] = _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("symbol", None) _v = symbol if symbol is not None else _v if _v is not None: self["symbol"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "line", "=", "None", ",", "opacity", "=", "None", ",", "outliercolor", "=", "None", ",", "size", "=", "None", ",", "symbol", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Marker", ",", "self", ")", ".", "__init__", "(", "\"marker\"", ")", "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.box.Marker \nconstructor must be a dict or \nan instance of :class:`plotly.graph_objs.box.Marker`\"\"\"", ")", "# 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", "(", "\"line\"", ",", "None", ")", "_v", "=", "line", "if", "line", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"line\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"opacity\"", ",", "None", ")", "_v", "=", "opacity", "if", "opacity", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"opacity\"", "]", "=", "_v", "_v", "=", "arg", ".", "pop", "(", "\"outliercolor\"", ",", "None", ")", "_v", "=", "outliercolor", "if", "outliercolor", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"outliercolor\"", "]", "=", "_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", "(", "\"symbol\"", ",", "None", ")", "_v", "=", "symbol", "if", "symbol", "is", "not", "None", "else", "_v", "if", "_v", "is", "not", "None", ":", "self", "[", "\"symbol\"", "]", "=", "_v", "# Process unknown kwargs", "# ----------------------", "self", ".", "_process_kwargs", "(", "*", "*", "dict", "(", "arg", ",", "*", "*", "kwargs", ")", ")", "# Reset skip_invalid", "# ------------------", "self", ".", "_skip_invalid", "=", "False" ]
[ 325, 4 ]
[ 430, 34 ]
python
en
['en', 'error', 'th']
False
plot_image
(image, figsize)
Display an image
Display an image
def plot_image(image, figsize): """ Display an image """ fig = plt.figure(figsize = figsize) plt.imshow(image, cmap = 'gray') plt.title(''), plt.xticks([]), plt.yticks([]) plt.show()
[ "def", "plot_image", "(", "image", ",", "figsize", ")", ":", "fig", "=", "plt", ".", "figure", "(", "figsize", "=", "figsize", ")", "plt", ".", "imshow", "(", "image", ",", "cmap", "=", "'gray'", ")", "plt", ".", "title", "(", "''", ")", ",", "plt", ".", "xticks", "(", "[", "]", ")", ",", "plt", ".", "yticks", "(", "[", "]", ")", "plt", ".", "show", "(", ")" ]
[ 10, 0 ]
[ 17, 14 ]
python
en
['en', 'ceb', 'en']
True
pattern_detection
(img, figsize)
Performs object segmentation by morphological filtering
Performs object segmentation by morphological filtering
def pattern_detection(img, figsize): """ Performs object segmentation by morphological filtering """ # BGR to grayscale imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img_backup = img.copy() # Get image size height, width, _ = np.array(img).shape # Erosion morphological filter kernel = np.ones((3,3), np.uint8) erosion = cv2.erode(imgGray, kernel, iterations = 2) th = cv2.threshold(erosion, 0, 255, cv2.THRESH_OTSU + cv2.THRESH_BINARY) # Image binarization th = erosion.mean() imBin = erosion > th # Finding contours ret, thresh = cv2.threshold(erosion, 127, 255, 0) contours, _ = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) # Compute contour areas for noise filtering areas = [cv2.contourArea(cnt) for cnt in contours] patterns, objects = [], [] # Drawing bounding boxes around the contours for cnt in contours: # Filtering large and small bounding boxes if (cv2.contourArea(cnt) > 50 and cv2.contourArea(cnt) < np.max(areas)): # Get bounding box coordinates x, y, w, h = cv2.boundingRect(cnt) patterns.append([x, y, w, h]) objects.append(cv2.cvtColor(img_backup[y:(y + h), x:(x+w)], cv2.COLOR_BGR2RGB)) # Draw bounding box img_backup = cv2.rectangle(img_backup, (x, y),(x+w, y+h),(255, 0, 0), 1) return patterns, objects
[ "def", "pattern_detection", "(", "img", ",", "figsize", ")", ":", "# BGR to grayscale", "imgGray", "=", "cv2", ".", "cvtColor", "(", "img", ",", "cv2", ".", "COLOR_BGR2GRAY", ")", "img_backup", "=", "img", ".", "copy", "(", ")", "# Get image size", "height", ",", "width", ",", "_", "=", "np", ".", "array", "(", "img", ")", ".", "shape", "# Erosion morphological filter", "kernel", "=", "np", ".", "ones", "(", "(", "3", ",", "3", ")", ",", "np", ".", "uint8", ")", "erosion", "=", "cv2", ".", "erode", "(", "imgGray", ",", "kernel", ",", "iterations", "=", "2", ")", "th", "=", "cv2", ".", "threshold", "(", "erosion", ",", "0", ",", "255", ",", "cv2", ".", "THRESH_OTSU", "+", "cv2", ".", "THRESH_BINARY", ")", "# Image binarization ", "th", "=", "erosion", ".", "mean", "(", ")", "imBin", "=", "erosion", ">", "th", "# Finding contours", "ret", ",", "thresh", "=", "cv2", ".", "threshold", "(", "erosion", ",", "127", ",", "255", ",", "0", ")", "contours", ",", "_", "=", "cv2", ".", "findContours", "(", "thresh", ",", "cv2", ".", "RETR_TREE", ",", "cv2", ".", "CHAIN_APPROX_SIMPLE", ")", "# Compute contour areas for noise filtering", "areas", "=", "[", "cv2", ".", "contourArea", "(", "cnt", ")", "for", "cnt", "in", "contours", "]", "patterns", ",", "objects", "=", "[", "]", ",", "[", "]", "# Drawing bounding boxes around the contours", "for", "cnt", "in", "contours", ":", "# Filtering large and small bounding boxes", "if", "(", "cv2", ".", "contourArea", "(", "cnt", ")", ">", "50", "and", "cv2", ".", "contourArea", "(", "cnt", ")", "<", "np", ".", "max", "(", "areas", ")", ")", ":", "# Get bounding box coordinates", "x", ",", "y", ",", "w", ",", "h", "=", "cv2", ".", "boundingRect", "(", "cnt", ")", "patterns", ".", "append", "(", "[", "x", ",", "y", ",", "w", ",", "h", "]", ")", "objects", ".", "append", "(", "cv2", ".", "cvtColor", "(", "img_backup", "[", "y", ":", "(", "y", "+", "h", ")", ",", "x", ":", "(", "x", "+", "w", ")", "]", ",", "cv2", ".", "COLOR_BGR2RGB", ")", ")", "# Draw bounding box", "img_backup", "=", "cv2", ".", "rectangle", "(", "img_backup", ",", "(", "x", ",", "y", ")", ",", "(", "x", "+", "w", ",", "y", "+", "h", ")", ",", "(", "255", ",", "0", ",", "0", ")", ",", "1", ")", "return", "patterns", ",", "objects" ]
[ 19, 0 ]
[ 60, 28 ]
python
en
['en', 'en', 'en']
True
image_loader
(image)
Load image and returns pytorch tensor
Load image and returns pytorch tensor
def image_loader(image): """ Load image and returns pytorch tensor """ imsize = 256 loader = transforms.Compose([transforms.Resize(imsize), transforms.ToTensor()]) image = Image.fromarray(image) image = loader(image).float() image = Variable(image, requires_grad = True) image = image.unsqueeze(0) # .cuda() assumes that you are using GPU return image
[ "def", "image_loader", "(", "image", ")", ":", "imsize", "=", "256", "loader", "=", "transforms", ".", "Compose", "(", "[", "transforms", ".", "Resize", "(", "imsize", ")", ",", "transforms", ".", "ToTensor", "(", ")", "]", ")", "image", "=", "Image", ".", "fromarray", "(", "image", ")", "image", "=", "loader", "(", "image", ")", ".", "float", "(", ")", "image", "=", "Variable", "(", "image", ",", "requires_grad", "=", "True", ")", "image", "=", "image", ".", "unsqueeze", "(", "0", ")", "# .cuda() assumes that you are using GPU", "return", "image" ]
[ 62, 0 ]
[ 74, 16 ]
python
en
['en', 'en', 'en']
True
build_model
()
Build feature extractor based on ResNet-34
Build feature extractor based on ResNet-34
def build_model(): """ Build feature extractor based on ResNet-34 """ # If True, returns a model pre-trained on ImageNet convnet = models.resnet34(pretrained = True) convnet = list(convnet.children())[:-2] convnet = torch.nn.Sequential(*convnet, torch.nn.AdaptiveAvgPool2d(output_size = (4, 4))) return convnet
[ "def", "build_model", "(", ")", ":", "# If True, returns a model pre-trained on ImageNet", "convnet", "=", "models", ".", "resnet34", "(", "pretrained", "=", "True", ")", "convnet", "=", "list", "(", "convnet", ".", "children", "(", ")", ")", "[", ":", "-", "2", "]", "convnet", "=", "torch", ".", "nn", ".", "Sequential", "(", "*", "convnet", ",", "torch", ".", "nn", ".", "AdaptiveAvgPool2d", "(", "output_size", "=", "(", "4", ",", "4", ")", ")", ")", "return", "convnet" ]
[ 76, 0 ]
[ 85, 18 ]
python
en
['en', 'en', 'en']
True
feature_extraction
(model, objects, patterns)
Feature extraction from all detected patterns
Feature extraction from all detected patterns
def feature_extraction(model, objects, patterns): """ Feature extraction from all detected patterns """ feature_vectors = [] for i in range(len(patterns)): x_min, y_min, width, height = patterns[i][0], patterns[i][1], patterns[i][2], patterns[i][3] image = image_loader(objects[i]) # Forward pass in each pattern features = model.forward(image) features = features.flatten().detach().numpy() feature_vectors.append(features) return feature_vectors
[ "def", "feature_extraction", "(", "model", ",", "objects", ",", "patterns", ")", ":", "feature_vectors", "=", "[", "]", "for", "i", "in", "range", "(", "len", "(", "patterns", ")", ")", ":", "x_min", ",", "y_min", ",", "width", ",", "height", "=", "patterns", "[", "i", "]", "[", "0", "]", ",", "patterns", "[", "i", "]", "[", "1", "]", ",", "patterns", "[", "i", "]", "[", "2", "]", ",", "patterns", "[", "i", "]", "[", "3", "]", "image", "=", "image_loader", "(", "objects", "[", "i", "]", ")", "# Forward pass in each pattern", "features", "=", "model", ".", "forward", "(", "image", ")", "features", "=", "features", ".", "flatten", "(", ")", ".", "detach", "(", ")", ".", "numpy", "(", ")", "feature_vectors", ".", "append", "(", "features", ")", "return", "feature_vectors" ]
[ 87, 0 ]
[ 102, 26 ]
python
en
['en', 'en', 'en']
True
pairwise_matrix
(feature_vectors)
Compute cosine similarity between feature vectors
Compute cosine similarity between feature vectors
def pairwise_matrix(feature_vectors): """ Compute cosine similarity between feature vectors """ cosine_similarity = np.ones((len(feature_vectors[0]), len(feature_vectors[0]))) for i in range(len(feature_vectors)-1): for j in range(len(feature_vectors)-1): cosine_similarity[i,j] = np.dot(feature_vectors[i], feature_vectors[j]) / (np.linalg.norm(feature_vectors[i]) * np.linalg.norm(feature_vectors[j])) return cosine_similarity
[ "def", "pairwise_matrix", "(", "feature_vectors", ")", ":", "cosine_similarity", "=", "np", ".", "ones", "(", "(", "len", "(", "feature_vectors", "[", "0", "]", ")", ",", "len", "(", "feature_vectors", "[", "0", "]", ")", ")", ")", "for", "i", "in", "range", "(", "len", "(", "feature_vectors", ")", "-", "1", ")", ":", "for", "j", "in", "range", "(", "len", "(", "feature_vectors", ")", "-", "1", ")", ":", "cosine_similarity", "[", "i", ",", "j", "]", "=", "np", ".", "dot", "(", "feature_vectors", "[", "i", "]", ",", "feature_vectors", "[", "j", "]", ")", "/", "(", "np", ".", "linalg", ".", "norm", "(", "feature_vectors", "[", "i", "]", ")", "*", "np", ".", "linalg", ".", "norm", "(", "feature_vectors", "[", "j", "]", ")", ")", "return", "cosine_similarity" ]
[ 104, 0 ]
[ 114, 28 ]
python
en
['en', 'nl', 'en']
True
Hoverlabel.align
(self)
Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'right', 'auto'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray
Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'right', 'auto'] - A tuple, list, or one-dimensional numpy array of the above
def align(self): """ Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'right', 'auto'] - A tuple, list, or one-dimensional numpy array of the above Returns ------- Any|numpy.ndarray """ return self["align"]
[ "def", "align", "(", "self", ")", ":", "return", "self", "[", "\"align\"", "]" ]
[ 25, 4 ]
[ 40, 28 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.alignsrc
(self)
Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' 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 align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def alignsrc(self): """ Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["alignsrc"]
[ "def", "alignsrc", "(", "self", ")", ":", "return", "self", "[", "\"alignsrc\"", "]" ]
[ 49, 4 ]
[ 60, 31 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bgcolor
(self)
Sets the background color of the hover labels for this trace 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 - A list or array of any of the above Returns ------- str|numpy.ndarray
Sets the background color of the hover labels for this trace 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 - A list or array of any of the above
def bgcolor(self): """ Sets the background color of the hover labels for this trace 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 - A list or array of any of the above Returns ------- str|numpy.ndarray """ return self["bgcolor"]
[ "def", "bgcolor", "(", "self", ")", ":", "return", "self", "[", "\"bgcolor\"", "]" ]
[ 69, 4 ]
[ 120, 30 ]
python
en
['en', 'error', 'th']
False