def __init__(self, arg=None, area=None, barpolar=None, bar=None, box=None, candlestick=None, carpet=None, choropleth=None, cone=None, contourcarpet=None, contour=None, heatmapgl=None, heatmap=None, histogram2dcontour=None, histogram2d=None, histogram=None, isosurface=None, mesh3d=None, ohlc=None, parcats=None, parcoords=None, pie=None, pointcloud=None, sankey=None, scatter3d=None, scattercarpet=None, scattergeo=None, scattergl=None, scattermapbox=None, scatterpolargl=None, scatterpolar=None, scatter=None, scatterternary=None, splom=None, streamtube=None, sunburst=None, surface=None, table=None, violin=None, volume=None, waterfall=None, **kwargs): """ Construct a new Data object Parameters ---------- arg dict of properties compatible with this constructor or an instance of plotly.graph_objs.layout.template.Data area plotly.graph_objs.layout.template.data.Area instance or dict with compatible properties barpolar plotly.graph_objs.layout.template.data.Barpolar instance or dict with compatible properties bar plotly.graph_objs.layout.template.data.Bar instance or dict with compatible properties box plotly.graph_objs.layout.template.data.Box instance or dict with compatible properties candlestick plotly.graph_objs.layout.template.data.Candlestick instance or dict with compatible properties carpet plotly.graph_objs.layout.template.data.Carpet instance or dict with compatible properties choropleth plotly.graph_objs.layout.template.data.Choropleth instance or dict with compatible properties cone plotly.graph_objs.layout.template.data.Cone instance or dict with compatible properties contourcarpet plotly.graph_objs.layout.template.data.Contourcarpet instance or dict with compatible properties contour plotly.graph_objs.layout.template.data.Contour instance or dict with compatible properties heatmapgl plotly.graph_objs.layout.template.data.Heatmapgl instance or dict with compatible properties heatmap plotly.graph_objs.layout.template.data.Heatmap instance or dict with compatible properties histogram2dcontour plotly.graph_objs.layout.template.data.Histogram2dConto ur instance or dict with compatible properties histogram2d plotly.graph_objs.layout.template.data.Histogram2d instance or dict with compatible properties histogram plotly.graph_objs.layout.template.data.Histogram instance or dict with compatible properties isosurface plotly.graph_objs.layout.template.data.Isosurface instance or dict with compatible properties mesh3d plotly.graph_objs.layout.template.data.Mesh3d instance or dict with compatible properties ohlc plotly.graph_objs.layout.template.data.Ohlc instance or dict with compatible properties parcats plotly.graph_objs.layout.template.data.Parcats instance or dict with compatible properties parcoords plotly.graph_objs.layout.template.data.Parcoords instance or dict with compatible properties pie plotly.graph_objs.layout.template.data.Pie instance or dict with compatible properties pointcloud plotly.graph_objs.layout.template.data.Pointcloud instance or dict with compatible properties sankey plotly.graph_objs.layout.template.data.Sankey instance or dict with compatible properties scatter3d plotly.graph_objs.layout.template.data.Scatter3d instance or dict with compatible properties scattercarpet plotly.graph_objs.layout.template.data.Scattercarpet instance or dict with compatible properties scattergeo plotly.graph_objs.layout.template.data.Scattergeo instance or dict with compatible properties scattergl plotly.graph_objs.layout.template.data.Scattergl instance or dict with compatible properties scattermapbox plotly.graph_objs.layout.template.data.Scattermapbox instance or dict with compatible properties scatterpolargl plotly.graph_objs.layout.template.data.Scatterpolargl instance or dict with compatible properties scatterpolar plotly.graph_objs.layout.template.data.Scatterpolar instance or dict with compatible properties scatter plotly.graph_objs.layout.template.data.Scatter instance or dict with compatible properties scatterternary plotly.graph_objs.layout.template.data.Scatterternary instance or dict with compatible properties splom plotly.graph_objs.layout.template.data.Splom instance or dict with compatible properties streamtube plotly.graph_objs.layout.template.data.Streamtube instance or dict with compatible properties sunburst plotly.graph_objs.layout.template.data.Sunburst instance or dict with compatible properties surface plotly.graph_objs.layout.template.data.Surface instance or dict with compatible properties table plotly.graph_objs.layout.template.data.Table instance or dict with compatible properties violin plotly.graph_objs.layout.template.data.Violin instance or dict with compatible properties volume plotly.graph_objs.layout.template.data.Volume instance or dict with compatible properties waterfall plotly.graph_objs.layout.template.data.Waterfall instance or dict with compatible properties Returns ------- Data """ super(Data, self).__init__('data') # 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.template.Data constructor must be a dict or an instance of plotly.graph_objs.layout.template.Data""") # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop('skip_invalid', False) # Import validators # ----------------- from plotly.validators.layout.template import (data as v_data) # Initialize validators # --------------------- self._validators['area'] = v_data.AreasValidator() self._validators['barpolar'] = v_data.BarpolarsValidator() self._validators['bar'] = v_data.BarsValidator() self._validators['box'] = v_data.BoxsValidator() self._validators['candlestick'] = v_data.CandlesticksValidator() self._validators['carpet'] = v_data.CarpetsValidator() self._validators['choropleth'] = v_data.ChoroplethsValidator() self._validators['cone'] = v_data.ConesValidator() self._validators['contourcarpet'] = v_data.ContourcarpetsValidator() self._validators['contour'] = v_data.ContoursValidator() self._validators['heatmapgl'] = v_data.HeatmapglsValidator() self._validators['heatmap'] = v_data.HeatmapsValidator() self._validators[ 'histogram2dcontour'] = v_data.Histogram2dContoursValidator() self._validators['histogram2d'] = v_data.Histogram2dsValidator() self._validators['histogram'] = v_data.HistogramsValidator() self._validators['isosurface'] = v_data.IsosurfacesValidator() self._validators['mesh3d'] = v_data.Mesh3dsValidator() self._validators['ohlc'] = v_data.OhlcsValidator() self._validators['parcats'] = v_data.ParcatssValidator() self._validators['parcoords'] = v_data.ParcoordssValidator() self._validators['pie'] = v_data.PiesValidator() self._validators['pointcloud'] = v_data.PointcloudsValidator() self._validators['sankey'] = v_data.SankeysValidator() self._validators['scatter3d'] = v_data.Scatter3dsValidator() self._validators['scattercarpet'] = v_data.ScattercarpetsValidator() self._validators['scattergeo'] = v_data.ScattergeosValidator() self._validators['scattergl'] = v_data.ScatterglsValidator() self._validators['scattermapbox'] = v_data.ScattermapboxsValidator() self._validators['scatterpolargl'] = v_data.ScatterpolarglsValidator() self._validators['scatterpolar'] = v_data.ScatterpolarsValidator() self._validators['scatter'] = v_data.ScattersValidator() self._validators['scatterternary'] = v_data.ScatterternarysValidator() self._validators['splom'] = v_data.SplomsValidator() self._validators['streamtube'] = v_data.StreamtubesValidator() self._validators['sunburst'] = v_data.SunburstsValidator() self._validators['surface'] = v_data.SurfacesValidator() self._validators['table'] = v_data.TablesValidator() self._validators['violin'] = v_data.ViolinsValidator() self._validators['volume'] = v_data.VolumesValidator() self._validators['waterfall'] = v_data.WaterfallsValidator() # Populate data dict with properties # ---------------------------------- _v = arg.pop('area', None) self['area'] = area if area is not None else _v _v = arg.pop('barpolar', None) self['barpolar'] = barpolar if barpolar is not None else _v _v = arg.pop('bar', None) self['bar'] = bar if bar is not None else _v _v = arg.pop('box', None) self['box'] = box if box is not None else _v _v = arg.pop('candlestick', None) self['candlestick'] = candlestick if candlestick is not None else _v _v = arg.pop('carpet', None) self['carpet'] = carpet if carpet is not None else _v _v = arg.pop('choropleth', None) self['choropleth'] = choropleth if choropleth is not None else _v _v = arg.pop('cone', None) self['cone'] = cone if cone is not None else _v _v = arg.pop('contourcarpet', None) self[ 'contourcarpet'] = contourcarpet if contourcarpet is not None else _v _v = arg.pop('contour', None) self['contour'] = contour if contour is not None else _v _v = arg.pop('heatmapgl', None) self['heatmapgl'] = heatmapgl if heatmapgl is not None else _v _v = arg.pop('heatmap', None) self['heatmap'] = heatmap if heatmap is not None else _v _v = arg.pop('histogram2dcontour', None) self[ 'histogram2dcontour'] = histogram2dcontour if histogram2dcontour is not None else _v _v = arg.pop('histogram2d', None) self['histogram2d'] = histogram2d if histogram2d is not None else _v _v = arg.pop('histogram', None) self['histogram'] = histogram if histogram is not None else _v _v = arg.pop('isosurface', None) self['isosurface'] = isosurface if isosurface is not None else _v _v = arg.pop('mesh3d', None) self['mesh3d'] = mesh3d if mesh3d is not None else _v _v = arg.pop('ohlc', None) self['ohlc'] = ohlc if ohlc is not None else _v _v = arg.pop('parcats', None) self['parcats'] = parcats if parcats is not None else _v _v = arg.pop('parcoords', None) self['parcoords'] = parcoords if parcoords is not None else _v _v = arg.pop('pie', None) self['pie'] = pie if pie is not None else _v _v = arg.pop('pointcloud', None) self['pointcloud'] = pointcloud if pointcloud is not None else _v _v = arg.pop('sankey', None) self['sankey'] = sankey if sankey is not None else _v _v = arg.pop('scatter3d', None) self['scatter3d'] = scatter3d if scatter3d is not None else _v _v = arg.pop('scattercarpet', None) self[ 'scattercarpet'] = scattercarpet if scattercarpet is not None else _v _v = arg.pop('scattergeo', None) self['scattergeo'] = scattergeo if scattergeo is not None else _v _v = arg.pop('scattergl', None) self['scattergl'] = scattergl if scattergl is not None else _v _v = arg.pop('scattermapbox', None) self[ 'scattermapbox'] = scattermapbox if scattermapbox is not None else _v _v = arg.pop('scatterpolargl', None) self[ 'scatterpolargl'] = scatterpolargl if scatterpolargl is not None else _v _v = arg.pop('scatterpolar', None) self['scatterpolar'] = scatterpolar if scatterpolar is not None else _v _v = arg.pop('scatter', None) self['scatter'] = scatter if scatter is not None else _v _v = arg.pop('scatterternary', None) self[ 'scatterternary'] = scatterternary if scatterternary is not None else _v _v = arg.pop('splom', None) self['splom'] = splom if splom is not None else _v _v = arg.pop('streamtube', None) self['streamtube'] = streamtube if streamtube is not None else _v _v = arg.pop('sunburst', None) self['sunburst'] = sunburst if sunburst is not None else _v _v = arg.pop('surface', None) self['surface'] = surface if surface is not None else _v _v = arg.pop('table', None) self['table'] = table if table is not None else _v _v = arg.pop('violin', None) self['violin'] = violin if violin is not None else _v _v = arg.pop('volume', None) self['volume'] = volume if volume is not None else _v _v = arg.pop('waterfall', None) self['waterfall'] = waterfall if waterfall 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, area=None, barpolar=None, bar=None, box=None, candlestick=None, carpet=None, choropleth=None, cone=None, contourcarpet=None, contour=None, funnelarea=None, funnel=None, heatmapgl=None, heatmap=None, histogram2dcontour=None, histogram2d=None, histogram=None, isosurface=None, mesh3d=None, ohlc=None, parcats=None, parcoords=None, pie=None, pointcloud=None, sankey=None, scatter3d=None, scattercarpet=None, scattergeo=None, scattergl=None, scattermapbox=None, scatterpolargl=None, scatterpolar=None, scatter=None, scatterternary=None, splom=None, streamtube=None, sunburst=None, surface=None, table=None, violin=None, volume=None, waterfall=None, **kwargs): """ Construct a new Data object Parameters ---------- arg dict of properties compatible with this constructor or an instance of plotly.graph_objs.layout.template.Data area A tuple of plotly.graph_objects.Area instances or dicts with compatible properties barpolar A tuple of plotly.graph_objects.Barpolar instances or dicts with compatible properties bar A tuple of plotly.graph_objects.Bar instances or dicts with compatible properties box A tuple of plotly.graph_objects.Box instances or dicts with compatible properties candlestick A tuple of plotly.graph_objects.Candlestick instances or dicts with compatible properties carpet A tuple of plotly.graph_objects.Carpet instances or dicts with compatible properties choropleth A tuple of plotly.graph_objects.Choropleth instances or dicts with compatible properties cone A tuple of plotly.graph_objects.Cone instances or dicts with compatible properties contourcarpet A tuple of plotly.graph_objects.Contourcarpet instances or dicts with compatible properties contour A tuple of plotly.graph_objects.Contour instances or dicts with compatible properties funnelarea A tuple of plotly.graph_objects.Funnelarea instances or dicts with compatible properties funnel A tuple of plotly.graph_objects.Funnel instances or dicts with compatible properties heatmapgl A tuple of plotly.graph_objects.Heatmapgl instances or dicts with compatible properties heatmap A tuple of plotly.graph_objects.Heatmap instances or dicts with compatible properties histogram2dcontour A tuple of plotly.graph_objects.Histogram2dContour instances or dicts with compatible properties histogram2d A tuple of plotly.graph_objects.Histogram2d instances or dicts with compatible properties histogram A tuple of plotly.graph_objects.Histogram instances or dicts with compatible properties isosurface A tuple of plotly.graph_objects.Isosurface instances or dicts with compatible properties mesh3d A tuple of plotly.graph_objects.Mesh3d instances or dicts with compatible properties ohlc A tuple of plotly.graph_objects.Ohlc instances or dicts with compatible properties parcats A tuple of plotly.graph_objects.Parcats instances or dicts with compatible properties parcoords A tuple of plotly.graph_objects.Parcoords instances or dicts with compatible properties pie A tuple of plotly.graph_objects.Pie instances or dicts with compatible properties pointcloud A tuple of plotly.graph_objects.Pointcloud instances or dicts with compatible properties sankey A tuple of plotly.graph_objects.Sankey instances or dicts with compatible properties scatter3d A tuple of plotly.graph_objects.Scatter3d instances or dicts with compatible properties scattercarpet A tuple of plotly.graph_objects.Scattercarpet instances or dicts with compatible properties scattergeo A tuple of plotly.graph_objects.Scattergeo instances or dicts with compatible properties scattergl A tuple of plotly.graph_objects.Scattergl instances or dicts with compatible properties scattermapbox A tuple of plotly.graph_objects.Scattermapbox instances or dicts with compatible properties scatterpolargl A tuple of plotly.graph_objects.Scatterpolargl instances or dicts with compatible properties scatterpolar A tuple of plotly.graph_objects.Scatterpolar instances or dicts with compatible properties scatter A tuple of plotly.graph_objects.Scatter instances or dicts with compatible properties scatterternary A tuple of plotly.graph_objects.Scatterternary instances or dicts with compatible properties splom A tuple of plotly.graph_objects.Splom instances or dicts with compatible properties streamtube A tuple of plotly.graph_objects.Streamtube instances or dicts with compatible properties sunburst A tuple of plotly.graph_objects.Sunburst instances or dicts with compatible properties surface A tuple of plotly.graph_objects.Surface instances or dicts with compatible properties table A tuple of plotly.graph_objects.Table instances or dicts with compatible properties violin A tuple of plotly.graph_objects.Violin instances or dicts with compatible properties volume A tuple of plotly.graph_objects.Volume instances or dicts with compatible properties waterfall A tuple of plotly.graph_objects.Waterfall instances or dicts with compatible properties Returns ------- Data """ super(Data, self).__init__("data") # 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.template.Data constructor must be a dict or an instance of plotly.graph_objs.layout.template.Data""") # Handle skip_invalid # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) # Import validators # ----------------- from plotly.validators.layout.template import data as v_data # Initialize validators # --------------------- self._validators["area"] = v_data.AreasValidator() self._validators["barpolar"] = v_data.BarpolarsValidator() self._validators["bar"] = v_data.BarsValidator() self._validators["box"] = v_data.BoxsValidator() self._validators["candlestick"] = v_data.CandlesticksValidator() self._validators["carpet"] = v_data.CarpetsValidator() self._validators["choropleth"] = v_data.ChoroplethsValidator() self._validators["cone"] = v_data.ConesValidator() self._validators["contourcarpet"] = v_data.ContourcarpetsValidator() self._validators["contour"] = v_data.ContoursValidator() self._validators["funnelarea"] = v_data.FunnelareasValidator() self._validators["funnel"] = v_data.FunnelsValidator() self._validators["heatmapgl"] = v_data.HeatmapglsValidator() self._validators["heatmap"] = v_data.HeatmapsValidator() self._validators[ "histogram2dcontour"] = v_data.Histogram2dContoursValidator() self._validators["histogram2d"] = v_data.Histogram2dsValidator() self._validators["histogram"] = v_data.HistogramsValidator() self._validators["isosurface"] = v_data.IsosurfacesValidator() self._validators["mesh3d"] = v_data.Mesh3dsValidator() self._validators["ohlc"] = v_data.OhlcsValidator() self._validators["parcats"] = v_data.ParcatssValidator() self._validators["parcoords"] = v_data.ParcoordssValidator() self._validators["pie"] = v_data.PiesValidator() self._validators["pointcloud"] = v_data.PointcloudsValidator() self._validators["sankey"] = v_data.SankeysValidator() self._validators["scatter3d"] = v_data.Scatter3dsValidator() self._validators["scattercarpet"] = v_data.ScattercarpetsValidator() self._validators["scattergeo"] = v_data.ScattergeosValidator() self._validators["scattergl"] = v_data.ScatterglsValidator() self._validators["scattermapbox"] = v_data.ScattermapboxsValidator() self._validators["scatterpolargl"] = v_data.ScatterpolarglsValidator() self._validators["scatterpolar"] = v_data.ScatterpolarsValidator() self._validators["scatter"] = v_data.ScattersValidator() self._validators["scatterternary"] = v_data.ScatterternarysValidator() self._validators["splom"] = v_data.SplomsValidator() self._validators["streamtube"] = v_data.StreamtubesValidator() self._validators["sunburst"] = v_data.SunburstsValidator() self._validators["surface"] = v_data.SurfacesValidator() self._validators["table"] = v_data.TablesValidator() self._validators["violin"] = v_data.ViolinsValidator() self._validators["volume"] = v_data.VolumesValidator() self._validators["waterfall"] = v_data.WaterfallsValidator() # Populate data dict with properties # ---------------------------------- _v = arg.pop("area", None) self["area"] = area if area is not None else _v _v = arg.pop("barpolar", None) self["barpolar"] = barpolar if barpolar is not None else _v _v = arg.pop("bar", None) self["bar"] = bar if bar is not None else _v _v = arg.pop("box", None) self["box"] = box if box is not None else _v _v = arg.pop("candlestick", None) self["candlestick"] = candlestick if candlestick is not None else _v _v = arg.pop("carpet", None) self["carpet"] = carpet if carpet is not None else _v _v = arg.pop("choropleth", None) self["choropleth"] = choropleth if choropleth is not None else _v _v = arg.pop("cone", None) self["cone"] = cone if cone is not None else _v _v = arg.pop("contourcarpet", None) self[ "contourcarpet"] = contourcarpet if contourcarpet is not None else _v _v = arg.pop("contour", None) self["contour"] = contour if contour is not None else _v _v = arg.pop("funnelarea", None) self["funnelarea"] = funnelarea if funnelarea is not None else _v _v = arg.pop("funnel", None) self["funnel"] = funnel if funnel is not None else _v _v = arg.pop("heatmapgl", None) self["heatmapgl"] = heatmapgl if heatmapgl is not None else _v _v = arg.pop("heatmap", None) self["heatmap"] = heatmap if heatmap is not None else _v _v = arg.pop("histogram2dcontour", None) self["histogram2dcontour"] = (histogram2dcontour if histogram2dcontour is not None else _v) _v = arg.pop("histogram2d", None) self["histogram2d"] = histogram2d if histogram2d is not None else _v _v = arg.pop("histogram", None) self["histogram"] = histogram if histogram is not None else _v _v = arg.pop("isosurface", None) self["isosurface"] = isosurface if isosurface is not None else _v _v = arg.pop("mesh3d", None) self["mesh3d"] = mesh3d if mesh3d is not None else _v _v = arg.pop("ohlc", None) self["ohlc"] = ohlc if ohlc is not None else _v _v = arg.pop("parcats", None) self["parcats"] = parcats if parcats is not None else _v _v = arg.pop("parcoords", None) self["parcoords"] = parcoords if parcoords is not None else _v _v = arg.pop("pie", None) self["pie"] = pie if pie is not None else _v _v = arg.pop("pointcloud", None) self["pointcloud"] = pointcloud if pointcloud is not None else _v _v = arg.pop("sankey", None) self["sankey"] = sankey if sankey is not None else _v _v = arg.pop("scatter3d", None) self["scatter3d"] = scatter3d if scatter3d is not None else _v _v = arg.pop("scattercarpet", None) self[ "scattercarpet"] = scattercarpet if scattercarpet is not None else _v _v = arg.pop("scattergeo", None) self["scattergeo"] = scattergeo if scattergeo is not None else _v _v = arg.pop("scattergl", None) self["scattergl"] = scattergl if scattergl is not None else _v _v = arg.pop("scattermapbox", None) self[ "scattermapbox"] = scattermapbox if scattermapbox is not None else _v _v = arg.pop("scatterpolargl", None) self[ "scatterpolargl"] = scatterpolargl if scatterpolargl is not None else _v _v = arg.pop("scatterpolar", None) self["scatterpolar"] = scatterpolar if scatterpolar is not None else _v _v = arg.pop("scatter", None) self["scatter"] = scatter if scatter is not None else _v _v = arg.pop("scatterternary", None) self[ "scatterternary"] = scatterternary if scatterternary is not None else _v _v = arg.pop("splom", None) self["splom"] = splom if splom is not None else _v _v = arg.pop("streamtube", None) self["streamtube"] = streamtube if streamtube is not None else _v _v = arg.pop("sunburst", None) self["sunburst"] = sunburst if sunburst is not None else _v _v = arg.pop("surface", None) self["surface"] = surface if surface is not None else _v _v = arg.pop("table", None) self["table"] = table if table is not None else _v _v = arg.pop("violin", None) self["violin"] = violin if violin is not None else _v _v = arg.pop("volume", None) self["volume"] = volume if volume is not None else _v _v = arg.pop("waterfall", None) self["waterfall"] = waterfall if waterfall is not None else _v # Process unknown kwargs # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) # Reset skip_invalid # ------------------ self._skip_invalid = False