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") # 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) # Import validators # ----------------- from plotly.validators.layout.mapbox import domain as v_domain # Initialize validators # --------------------- self._validators["column"] = v_domain.ColumnValidator() self._validators["row"] = v_domain.RowValidator() self._validators["x"] = v_domain.XValidator() self._validators["y"] = v_domain.YValidator() # Populate data dict with properties # ---------------------------------- _v = arg.pop("column", None) self["column"] = column if column is not None else _v _v = arg.pop("row", None) self["row"] = row if row is not None else _v _v = arg.pop("x", None) self["x"] = x if x is not None else _v _v = arg.pop("y", None) self["y"] = y if y is not None else _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 ): """ Construct a new Domain object Parameters ---------- arg dict of properties compatible with this constructor or an instance of 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') # 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 plotly.graph_objs.layout.mapbox.Domain""" ) # Import validators # ----------------- from plotly.validators.layout.mapbox import (domain as v_domain) # Initialize validators # --------------------- self._validators['column'] = v_domain.ColumnValidator() self._validators['row'] = v_domain.RowValidator() self._validators['x'] = v_domain.XValidator() self._validators['y'] = v_domain.YValidator() # Populate data dict with properties # ---------------------------------- v = arg.pop('column', None) self.column = column if column is not None else v v = arg.pop('row', None) self.row = row if row is not None else v v = arg.pop('x', None) self.x = x if x is not None else v v = arg.pop('y', None) self.y = y if y is not None else v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs))