from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Smith(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout" _path_str = "layout.smith" _valid_props = {"bgcolor", "domain", "imaginaryaxis", "realaxis"} # bgcolor # ------- @property def bgcolor(self): """ Set the background color of the subplot 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"] @bgcolor.setter def bgcolor(self, val): self["bgcolor"] = val # domain # ------ @property def domain(self): """ The 'domain' property is an instance of Domain that may be specified as: - An instance of :class:`plotly.graph_objs.layout.smith.Domain` - A dict of string/value properties that will be passed to the Domain constructor Supported dict properties: column If there is a layout grid, use the domain for this column in the grid for this smith subplot . row If there is a layout grid, use the domain for this row in the grid for this smith subplot . x Sets the horizontal domain of this smith subplot (in plot fraction). y Sets the vertical domain of this smith subplot (in plot fraction). Returns ------- plotly.graph_objs.layout.smith.Domain """ return self["domain"] @domain.setter def domain(self, val): self["domain"] = val # imaginaryaxis # ------------- @property def imaginaryaxis(self): """ The 'imaginaryaxis' property is an instance of Imaginaryaxis that may be specified as: - An instance of :class:`plotly.graph_objs.layout.smith.Imaginaryaxis` - A dict of string/value properties that will be passed to the Imaginaryaxis constructor Supported dict properties: color Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this. gridcolor Sets the color of the grid lines. gridwidth Sets the width (in px) of the grid lines. hoverformat Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://github.com/d3/d3-format/tree/v1.4.5#d3-f ormat. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: "%h" for half of the year as a decimal number as well as "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" layer Sets the layer on which this axis is displayed. If *above traces*, this axis is displayed above all the subplot's traces If *below traces*, this axis is displayed below all the subplot's traces, but above the grid lines. Useful when used together with scatter-like traces with `cliponaxis` set to False to show markers and/or text nodes above this axis. linecolor Sets the axis line color. linewidth Sets the width (in px) of the axis line. showgrid Determines whether or not grid lines are drawn. If True, the grid lines are drawn at every tick mark. showline Determines whether or not a line bounding this axis is drawn. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. tickcolor Sets the tick color. tickfont Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://github.com/d3/d3-format/tree/v1.4.5#d3-f ormat. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: "%h" for half of the year as a decimal number as well as "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" ticklen Sets the tick length (in px). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines. ticksuffix Sets a tick label suffix. tickvals Sets the values at which ticks on this axis appear. Defaults to `realaxis.tickvals` plus the same as negatives and zero. tickvalssrc Sets the source reference on Chart Studio Cloud for `tickvals`. tickwidth Sets the tick width (in px). visible A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false Returns ------- plotly.graph_objs.layout.smith.Imaginaryaxis """ return self["imaginaryaxis"] @imaginaryaxis.setter def imaginaryaxis(self, val): self["imaginaryaxis"] = val # realaxis # -------- @property def realaxis(self): """ The 'realaxis' property is an instance of Realaxis that may be specified as: - An instance of :class:`plotly.graph_objs.layout.smith.Realaxis` - A dict of string/value properties that will be passed to the Realaxis constructor Supported dict properties: color Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this. gridcolor Sets the color of the grid lines. gridwidth Sets the width (in px) of the grid lines. hoverformat Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://github.com/d3/d3-format/tree/v1.4.5#d3-f ormat. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: "%h" for half of the year as a decimal number as well as "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" layer Sets the layer on which this axis is displayed. If *above traces*, this axis is displayed above all the subplot's traces If *below traces*, this axis is displayed below all the subplot's traces, but above the grid lines. Useful when used together with scatter-like traces with `cliponaxis` set to False to show markers and/or text nodes above this axis. linecolor Sets the axis line color. linewidth Sets the width (in px) of the axis line. showgrid Determines whether or not grid lines are drawn. If True, the grid lines are drawn at every tick mark. showline Determines whether or not a line bounding this axis is drawn. showticklabels Determines whether or not the tick labels are drawn. showtickprefix If "all", all tick labels are displayed with a prefix. If "first", only the first tick is displayed with a prefix. If "last", only the last tick is displayed with a suffix. If "none", tick prefixes are hidden. showticksuffix Same as `showtickprefix` but for tick suffixes. side Determines on which side of real axis line the tick and tick labels appear. tickangle Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically. tickcolor Sets the tick color. tickfont Sets the tick font. tickformat Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: h ttps://github.com/d3/d3-format/tree/v1.4.5#d3-f ormat. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: "%h" for half of the year as a decimal number as well as "%{n}f" for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat "%H~%M~%S.%2f" would display "09~15~23.46" ticklen Sets the tick length (in px). tickprefix Sets a tick label prefix. ticks Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "top" ("bottom"), this axis' are drawn above (below) the axis line. ticksuffix Sets a tick label suffix. tickvals Sets the values at which ticks on this axis appear. tickvalssrc Sets the source reference on Chart Studio Cloud for `tickvals`. tickwidth Sets the tick width (in px). visible A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false Returns ------- plotly.graph_objs.layout.smith.Realaxis """ return self["realaxis"] @realaxis.setter def realaxis(self, val): self["realaxis"] = val # Self properties description # --------------------------- @property def _prop_descriptions(self): return """\ bgcolor Set the background color of the subplot domain :class:`plotly.graph_objects.layout.smith.Domain` instance or dict with compatible properties imaginaryaxis :class:`plotly.graph_objects.layout.smith.Imaginaryaxis ` instance or dict with compatible properties realaxis :class:`plotly.graph_objects.layout.smith.Realaxis` instance or dict with compatible properties """ def __init__( self, arg=None, bgcolor=None, domain=None, imaginaryaxis=None, realaxis=None, **kwargs ): """ Construct a new Smith object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.Smith` bgcolor Set the background color of the subplot domain :class:`plotly.graph_objects.layout.smith.Domain` instance or dict with compatible properties imaginaryaxis :class:`plotly.graph_objects.layout.smith.Imaginaryaxis ` instance or dict with compatible properties realaxis :class:`plotly.graph_objects.layout.smith.Realaxis` instance or dict with compatible properties Returns ------- Smith """ super(Smith, self).__init__("smith") 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.Smith constructor must be a dict or an instance of :class:`plotly.graph_objs.layout.Smith`""" ) # 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("domain", None) _v = domain if domain is not None else _v if _v is not None: self["domain"] = _v _v = arg.pop("imaginaryaxis", None) _v = imaginaryaxis if imaginaryaxis is not None else _v if _v is not None: self["imaginaryaxis"] = _v _v = arg.pop("realaxis", None) _v = realaxis if realaxis is not None else _v if _v is not None: self["realaxis"] = _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False