Пример #1
0
    def get_validator(parent_path, prop_name):

        key = (parent_path, prop_name)
        if key not in ValidatorCache._cache:

            if "." not in parent_path and prop_name == "type":
                # Special case for .type property of traces
                validator = LiteralValidator("type", parent_path, parent_path)
            else:
                lookup_name = None
                if parent_path == "layout":
                    from .graph_objects import Layout

                    match = Layout._subplotid_prop_re.match(prop_name)
                    if match:
                        lookup_name = match.group(1)

                lookup_name = lookup_name or prop_name
                class_name = lookup_name.title() + "Validator"
                validator = getattr(
                    importlib.import_module("plotly.validators." +
                                            parent_path),
                    class_name,
                )(plotly_name=prop_name)
            ValidatorCache._cache[key] = validator

        return ValidatorCache._cache[key]
Пример #2
0
    def __init__(self,
                 arg=None,
                 connectgaps=None,
                 customdata=None,
                 customdatasrc=None,
                 fill=None,
                 fillcolor=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 hovertext=None,
                 hovertextsrc=None,
                 ids=None,
                 idssrc=None,
                 lat=None,
                 latsrc=None,
                 legendgroup=None,
                 line=None,
                 lon=None,
                 lonsrc=None,
                 marker=None,
                 mode=None,
                 name=None,
                 opacity=None,
                 selected=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 subplot=None,
                 text=None,
                 textfont=None,
                 textposition=None,
                 textsrc=None,
                 uid=None,
                 unselected=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Scattermapbox object
        
        The data visualized as scatter point, lines or marker symbols
        on a Mapbox GL geographic map is provided by longitude/latitude
        pairs in `lon` and `lat`.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Scattermapbox
        connectgaps
            Determines whether or not gaps (i.e. {nan} or missing
            values) in the provided data arrays are connected.
        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 plot.ly for  customdata .
        fill
            Sets the area to fill with a solid color. Use with
            `fillcolor` if not *none*. *toself* connects the
            endpoints of the trace (or each segment of the trace if
            it has gaps) into a closed shape.
        fillcolor
            Sets the fill color. Defaults to a half-transparent
            variant of the line color, marker color, or marker line
            color, whichever is available.
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.scattermapbox.Hoverlabel instance or
            dict with compatible properties
        hovertext
            Sets hover text elements associated with each (lon,lat)
            pair If a single string, the same string appears over
            all the data points. If an array of string, the items
            are mapped in order to the this trace's (lon,lat)
            coordinates. To be seen, trace `hoverinfo` must contain
            a *text* flag.
        hovertextsrc
            Sets the source reference on plot.ly 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 plot.ly for  ids .
        lat
            Sets the latitude coordinates (in degrees North).
        latsrc
            Sets the source reference on plot.ly for  lat .
        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.
        line
            plotly.graph_objs.scattermapbox.Line instance or dict
            with compatible properties
        lon
            Sets the longitude coordinates (in degrees East).
        lonsrc
            Sets the source reference on plot.ly for  lon .
        marker
            plotly.graph_objs.scattermapbox.Marker instance or dict
            with compatible properties
        mode
            Determines the drawing mode for this scatter trace. If
            the provided `mode` includes *text* then the `text`
            elements appear at the coordinates. Otherwise, the
            `text` elements appear on hover.
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        selected
            plotly.graph_objs.scattermapbox.Selected instance or
            dict with compatible properties
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.scattermapbox.Stream instance or dict
            with compatible properties
        subplot
            Sets a reference between this trace's data coordinates
            and a mapbox subplot. If *mapbox* (the default value),
            the data refer to `layout.mapbox`. If *mapbox2*, the
            data refer to `layout.mapbox2`, and so on.
        text
            Sets text elements associated with each (lon,lat) pair
            If a single string, the same string appears over all
            the data points. If an array of string, the items are
            mapped in order to the this trace's (lon,lat)
            coordinates. If trace `hoverinfo` contains a *text*
            flag and *hovertext* is not set, these elements will be
            seen in the hover labels.
        textfont
            Sets the icon text font. Has an effect only when `type`
            is set to *symbol*.
        textposition
            Sets the positions of the `text` elements with respects
            to the (x,y) coordinates.
        textsrc
            Sets the source reference on plot.ly for  text .
        uid

        unselected
            plotly.graph_objs.scattermapbox.Unselected instance or
            dict with compatible properties
        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).

        Returns
        -------
        Scattermapbox
        """
        super(Scattermapbox, self).__init__('scattermapbox')

        # 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.Scattermapbox 
constructor must be a dict or 
an instance of plotly.graph_objs.Scattermapbox""")

        # Import validators
        # -----------------
        from plotly.validators import (scattermapbox as v_scattermapbox)

        # Initialize validators
        # ---------------------
        self._validators['connectgaps'] = v_scattermapbox.ConnectgapsValidator(
        )
        self._validators['customdata'] = v_scattermapbox.CustomdataValidator()
        self._validators[
            'customdatasrc'] = v_scattermapbox.CustomdatasrcValidator()
        self._validators['fill'] = v_scattermapbox.FillValidator()
        self._validators['fillcolor'] = v_scattermapbox.FillcolorValidator()
        self._validators['hoverinfo'] = v_scattermapbox.HoverinfoValidator()
        self._validators[
            'hoverinfosrc'] = v_scattermapbox.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_scattermapbox.HoverlabelValidator()
        self._validators['hovertext'] = v_scattermapbox.HovertextValidator()
        self._validators[
            'hovertextsrc'] = v_scattermapbox.HovertextsrcValidator()
        self._validators['ids'] = v_scattermapbox.IdsValidator()
        self._validators['idssrc'] = v_scattermapbox.IdssrcValidator()
        self._validators['lat'] = v_scattermapbox.LatValidator()
        self._validators['latsrc'] = v_scattermapbox.LatsrcValidator()
        self._validators['legendgroup'] = v_scattermapbox.LegendgroupValidator(
        )
        self._validators['line'] = v_scattermapbox.LineValidator()
        self._validators['lon'] = v_scattermapbox.LonValidator()
        self._validators['lonsrc'] = v_scattermapbox.LonsrcValidator()
        self._validators['marker'] = v_scattermapbox.MarkerValidator()
        self._validators['mode'] = v_scattermapbox.ModeValidator()
        self._validators['name'] = v_scattermapbox.NameValidator()
        self._validators['opacity'] = v_scattermapbox.OpacityValidator()
        self._validators['selected'] = v_scattermapbox.SelectedValidator()
        self._validators[
            'selectedpoints'] = v_scattermapbox.SelectedpointsValidator()
        self._validators['showlegend'] = v_scattermapbox.ShowlegendValidator()
        self._validators['stream'] = v_scattermapbox.StreamValidator()
        self._validators['subplot'] = v_scattermapbox.SubplotValidator()
        self._validators['text'] = v_scattermapbox.TextValidator()
        self._validators['textfont'] = v_scattermapbox.TextfontValidator()
        self._validators[
            'textposition'] = v_scattermapbox.TextpositionValidator()
        self._validators['textsrc'] = v_scattermapbox.TextsrcValidator()
        self._validators['uid'] = v_scattermapbox.UidValidator()
        self._validators['unselected'] = v_scattermapbox.UnselectedValidator()
        self._validators['visible'] = v_scattermapbox.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('connectgaps', None)
        self.connectgaps = connectgaps if connectgaps is not None else _v
        _v = arg.pop('customdata', None)
        self.customdata = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self.customdatasrc = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('fill', None)
        self.fill = fill if fill is not None else _v
        _v = arg.pop('fillcolor', None)
        self.fillcolor = fillcolor if fillcolor is not None else _v
        _v = arg.pop('hoverinfo', None)
        self.hoverinfo = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self.hoverinfosrc = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self.hoverlabel = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('hovertext', None)
        self.hovertext = hovertext if hovertext is not None else _v
        _v = arg.pop('hovertextsrc', None)
        self.hovertextsrc = hovertextsrc if hovertextsrc is not None else _v
        _v = arg.pop('ids', None)
        self.ids = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self.idssrc = idssrc if idssrc is not None else _v
        _v = arg.pop('lat', None)
        self.lat = lat if lat is not None else _v
        _v = arg.pop('latsrc', None)
        self.latsrc = latsrc if latsrc is not None else _v
        _v = arg.pop('legendgroup', None)
        self.legendgroup = legendgroup if legendgroup is not None else _v
        _v = arg.pop('line', None)
        self.line = line if line is not None else _v
        _v = arg.pop('lon', None)
        self.lon = lon if lon is not None else _v
        _v = arg.pop('lonsrc', None)
        self.lonsrc = lonsrc if lonsrc is not None else _v
        _v = arg.pop('marker', None)
        self.marker = marker if marker is not None else _v
        _v = arg.pop('mode', None)
        self.mode = mode if mode is not None else _v
        _v = arg.pop('name', None)
        self.name = name if name is not None else _v
        _v = arg.pop('opacity', None)
        self.opacity = opacity if opacity is not None else _v
        _v = arg.pop('selected', None)
        self.selected = selected if selected is not None else _v
        _v = arg.pop('selectedpoints', None)
        self.selectedpoints = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self.showlegend = showlegend if showlegend is not None else _v
        _v = arg.pop('stream', None)
        self.stream = stream if stream is not None else _v
        _v = arg.pop('subplot', None)
        self.subplot = subplot if subplot is not None else _v
        _v = arg.pop('text', None)
        self.text = text if text is not None else _v
        _v = arg.pop('textfont', None)
        self.textfont = textfont if textfont is not None else _v
        _v = arg.pop('textposition', None)
        self.textposition = textposition if textposition is not None else _v
        _v = arg.pop('textsrc', None)
        self.textsrc = textsrc if textsrc is not None else _v
        _v = arg.pop('uid', None)
        self.uid = uid if uid is not None else _v
        _v = arg.pop('unselected', None)
        self.unselected = unselected if unselected is not None else _v
        _v = arg.pop('visible', None)
        self.visible = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'scattermapbox'
        self._validators['type'] = LiteralValidator(
            plotly_name='type', parent_name='scattermapbox')

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))
Пример #3
0
    def __init__(self,
                 arg=None,
                 arrangement=None,
                 customdata=None,
                 customdatasrc=None,
                 domain=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 ids=None,
                 idssrc=None,
                 legendgroup=None,
                 link=None,
                 name=None,
                 node=None,
                 opacity=None,
                 orientation=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 textfont=None,
                 uid=None,
                 valueformat=None,
                 valuesuffix=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Sankey object
        
        Sankey plots for network flow data analysis. The nodes are
        specified in `nodes` and the links between sources and targets
        in `links`. The colors are set in `nodes[i].color` and
        `links[i].color`; otherwise defaults are used.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Sankey
        arrangement
            If value is `snap` (the default), the node arrangement
            is assisted by automatic snapping of elements to
            preserve space between nodes specified via `nodepad`.
            If value is `perpendicular`, the nodes can only move
            along a line perpendicular to the flow. If value is
            `freeform`, the nodes can freely move on the plane. If
            value is `fixed`, the nodes are stationary.
        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 plot.ly for  customdata .
        domain
            plotly.graph_objs.sankey.Domain instance or dict with
            compatible properties
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.sankey.Hoverlabel instance or dict
            with compatible properties
        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 plot.ly for  ids .
        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.
        link
            The links of the Sankey plot.
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        node
            The nodes of the Sankey plot.
        opacity
            Sets the opacity of the trace.
        orientation
            Sets the orientation of the Sankey diagram.
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.sankey.Stream instance or dict with
            compatible properties
        textfont
            Sets the font for node labels
        uid

        valueformat
            Sets the value formatting rule using d3 formatting
            mini-language which is similar to those of Python. See 
            https://github.com/d3/d3-format/blob/master/README.md#l
            ocale_format
        valuesuffix
            Adds a unit to follow the value in the hover tooltip.
            Add a space if a separation is necessary from the
            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).

        Returns
        -------
        Sankey
        """
        super(Sankey, self).__init__('sankey')

        # 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.Sankey 
constructor must be a dict or 
an instance of plotly.graph_objs.Sankey""")

        # Import validators
        # -----------------
        from plotly.validators import (sankey as v_sankey)

        # Initialize validators
        # ---------------------
        self._validators['arrangement'] = v_sankey.ArrangementValidator()
        self._validators['customdata'] = v_sankey.CustomdataValidator()
        self._validators['customdatasrc'] = v_sankey.CustomdatasrcValidator()
        self._validators['domain'] = v_sankey.DomainValidator()
        self._validators['hoverinfo'] = v_sankey.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_sankey.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_sankey.HoverlabelValidator()
        self._validators['ids'] = v_sankey.IdsValidator()
        self._validators['idssrc'] = v_sankey.IdssrcValidator()
        self._validators['legendgroup'] = v_sankey.LegendgroupValidator()
        self._validators['link'] = v_sankey.LinkValidator()
        self._validators['name'] = v_sankey.NameValidator()
        self._validators['node'] = v_sankey.NodeValidator()
        self._validators['opacity'] = v_sankey.OpacityValidator()
        self._validators['orientation'] = v_sankey.OrientationValidator()
        self._validators['selectedpoints'] = v_sankey.SelectedpointsValidator()
        self._validators['showlegend'] = v_sankey.ShowlegendValidator()
        self._validators['stream'] = v_sankey.StreamValidator()
        self._validators['textfont'] = v_sankey.TextfontValidator()
        self._validators['uid'] = v_sankey.UidValidator()
        self._validators['valueformat'] = v_sankey.ValueformatValidator()
        self._validators['valuesuffix'] = v_sankey.ValuesuffixValidator()
        self._validators['visible'] = v_sankey.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('arrangement', None)
        self.arrangement = arrangement if arrangement is not None else _v
        _v = arg.pop('customdata', None)
        self.customdata = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self.customdatasrc = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('domain', None)
        self.domain = domain if domain is not None else _v
        _v = arg.pop('hoverinfo', None)
        self.hoverinfo = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self.hoverinfosrc = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self.hoverlabel = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('ids', None)
        self.ids = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self.idssrc = idssrc if idssrc is not None else _v
        _v = arg.pop('legendgroup', None)
        self.legendgroup = legendgroup if legendgroup is not None else _v
        _v = arg.pop('link', None)
        self.link = link if link is not None else _v
        _v = arg.pop('name', None)
        self.name = name if name is not None else _v
        _v = arg.pop('node', None)
        self.node = node if node is not None else _v
        _v = arg.pop('opacity', None)
        self.opacity = opacity if opacity is not None else _v
        _v = arg.pop('orientation', None)
        self.orientation = orientation if orientation is not None else _v
        _v = arg.pop('selectedpoints', None)
        self.selectedpoints = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self.showlegend = showlegend if showlegend is not None else _v
        _v = arg.pop('stream', None)
        self.stream = stream if stream is not None else _v
        _v = arg.pop('textfont', None)
        self.textfont = textfont if textfont is not None else _v
        _v = arg.pop('uid', None)
        self.uid = uid if uid is not None else _v
        _v = arg.pop('valueformat', None)
        self.valueformat = valueformat if valueformat is not None else _v
        _v = arg.pop('valuesuffix', None)
        self.valuesuffix = valuesuffix if valuesuffix is not None else _v
        _v = arg.pop('visible', None)
        self.visible = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'sankey'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='sankey')

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))
Пример #4
0
    def __init__(self,
                 arg=None,
                 cells=None,
                 columnorder=None,
                 columnordersrc=None,
                 columnwidth=None,
                 columnwidthsrc=None,
                 customdata=None,
                 customdatasrc=None,
                 domain=None,
                 header=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 ids=None,
                 idssrc=None,
                 legendgroup=None,
                 name=None,
                 opacity=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 uid=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Table object
        
        Table view for detailed data viewing. The data are arranged in
        a grid of rows and columns. Most styling can be specified for
        columns, rows or individual cells. Table is using a column-
        major order, ie. the grid is represented as a vector of column
        vectors.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Table
        cells
            plotly.graph_objs.table.Cells instance or dict with
            compatible properties
        columnorder
            Specifies the rendered order of the data columns; for
            example, a value `2` at position `0` means that column
            index `0` in the data will be rendered as the third
            column, as columns have an index base of zero.
        columnordersrc
            Sets the source reference on plot.ly for  columnorder .
        columnwidth
            The width of columns expressed as a ratio. Columns fill
            the available width in proportion of their specified
            column widths.
        columnwidthsrc
            Sets the source reference on plot.ly for  columnwidth .
        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 plot.ly for  customdata .
        domain
            plotly.graph_objs.table.Domain instance or dict with
            compatible properties
        header
            plotly.graph_objs.table.Header instance or dict with
            compatible properties
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.table.Hoverlabel instance or dict
            with compatible properties
        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 plot.ly for  ids .
        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.
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.table.Stream instance or dict with
            compatible properties
        uid

        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).

        Returns
        -------
        Table
        """
        super(Table, self).__init__('table')

        # 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.Table 
constructor must be a dict or 
an instance of plotly.graph_objs.Table""")

        # Import validators
        # -----------------
        from plotly.validators import (table as v_table)

        # Initialize validators
        # ---------------------
        self._validators['cells'] = v_table.CellsValidator()
        self._validators['columnorder'] = v_table.ColumnorderValidator()
        self._validators['columnordersrc'] = v_table.ColumnordersrcValidator()
        self._validators['columnwidth'] = v_table.ColumnwidthValidator()
        self._validators['columnwidthsrc'] = v_table.ColumnwidthsrcValidator()
        self._validators['customdata'] = v_table.CustomdataValidator()
        self._validators['customdatasrc'] = v_table.CustomdatasrcValidator()
        self._validators['domain'] = v_table.DomainValidator()
        self._validators['header'] = v_table.HeaderValidator()
        self._validators['hoverinfo'] = v_table.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_table.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_table.HoverlabelValidator()
        self._validators['ids'] = v_table.IdsValidator()
        self._validators['idssrc'] = v_table.IdssrcValidator()
        self._validators['legendgroup'] = v_table.LegendgroupValidator()
        self._validators['name'] = v_table.NameValidator()
        self._validators['opacity'] = v_table.OpacityValidator()
        self._validators['selectedpoints'] = v_table.SelectedpointsValidator()
        self._validators['showlegend'] = v_table.ShowlegendValidator()
        self._validators['stream'] = v_table.StreamValidator()
        self._validators['uid'] = v_table.UidValidator()
        self._validators['visible'] = v_table.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('cells', None)
        self.cells = cells if cells is not None else _v
        _v = arg.pop('columnorder', None)
        self.columnorder = columnorder if columnorder is not None else _v
        _v = arg.pop('columnordersrc', None)
        self.columnordersrc = columnordersrc if columnordersrc is not None else _v
        _v = arg.pop('columnwidth', None)
        self.columnwidth = columnwidth if columnwidth is not None else _v
        _v = arg.pop('columnwidthsrc', None)
        self.columnwidthsrc = columnwidthsrc if columnwidthsrc is not None else _v
        _v = arg.pop('customdata', None)
        self.customdata = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self.customdatasrc = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('domain', None)
        self.domain = domain if domain is not None else _v
        _v = arg.pop('header', None)
        self.header = header if header is not None else _v
        _v = arg.pop('hoverinfo', None)
        self.hoverinfo = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self.hoverinfosrc = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self.hoverlabel = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('ids', None)
        self.ids = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self.idssrc = idssrc if idssrc is not None else _v
        _v = arg.pop('legendgroup', None)
        self.legendgroup = legendgroup if legendgroup is not None else _v
        _v = arg.pop('name', None)
        self.name = name if name is not None else _v
        _v = arg.pop('opacity', None)
        self.opacity = opacity if opacity is not None else _v
        _v = arg.pop('selectedpoints', None)
        self.selectedpoints = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self.showlegend = showlegend if showlegend is not None else _v
        _v = arg.pop('stream', None)
        self.stream = stream if stream is not None else _v
        _v = arg.pop('uid', None)
        self.uid = uid if uid is not None else _v
        _v = arg.pop('visible', None)
        self.visible = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'table'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='table',
                                                    val='table')

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))
Пример #5
0
    def __init__(self,
                 arg=None,
                 customdata=None,
                 customdatasrc=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 ids=None,
                 idssrc=None,
                 indices=None,
                 indicessrc=None,
                 legendgroup=None,
                 marker=None,
                 name=None,
                 opacity=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 text=None,
                 textsrc=None,
                 uid=None,
                 visible=None,
                 x=None,
                 xaxis=None,
                 xbounds=None,
                 xboundssrc=None,
                 xsrc=None,
                 xy=None,
                 xysrc=None,
                 y=None,
                 yaxis=None,
                 ybounds=None,
                 yboundssrc=None,
                 ysrc=None,
                 **kwargs):
        """
        Construct a new Pointcloud object
        
        The data visualized as a point cloud set in `x` and `y` using
        the WebGl plotting engine.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Pointcloud
        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 plot.ly for  customdata .
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.pointcloud.Hoverlabel instance or
            dict with compatible properties
        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 plot.ly for  ids .
        indices
            A sequential value, 0..n, supply it to avoid creating
            this array inside plotting. If specified, it must be a
            typed `Int32Array` array. Its length must be equal to
            or greater than the number of points. For the best
            performance and memory use, create one large `indices`
            typed array that is guaranteed to be at least as long
            as the largest number of points during use, and reuse
            it on each `Plotly.restyle()` call.
        indicessrc
            Sets the source reference on plot.ly for  indices .
        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.
        marker
            plotly.graph_objs.pointcloud.Marker instance or dict
            with compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.pointcloud.Stream instance or dict
            with compatible properties
        text
            Sets text elements associated with each (x,y) pair. If
            a single string, the same string appears over all the
            data points. If an array of string, the items are
            mapped in order to the this trace's (x,y) coordinates.
            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 plot.ly for  text .
        uid

        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.
        xaxis
            Sets a reference between this trace's x coordinates and
            a 2D cartesian x axis. If *x* (the default value), the
            x coordinates refer to `layout.xaxis`. If *x2*, the x
            coordinates refer to `layout.xaxis2`, and so on.
        xbounds
            Specify `xbounds` in the shape of `[xMin, xMax] to
            avoid looping through the `xy` typed array. Use it in
            conjunction with `xy` and `ybounds` for the performance
            benefits.
        xboundssrc
            Sets the source reference on plot.ly for  xbounds .
        xsrc
            Sets the source reference on plot.ly for  x .
        xy
            Faster alternative to specifying `x` and `y`
            separately. If supplied, it must be a typed
            `Float32Array` array that represents points such that
            `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]`
        xysrc
            Sets the source reference on plot.ly for  xy .
        y
            Sets the y coordinates.
        yaxis
            Sets a reference between this trace's y coordinates and
            a 2D cartesian y axis. If *y* (the default value), the
            y coordinates refer to `layout.yaxis`. If *y2*, the y
            coordinates refer to `layout.yaxis2`, and so on.
        ybounds
            Specify `ybounds` in the shape of `[yMin, yMax] to
            avoid looping through the `xy` typed array. Use it in
            conjunction with `xy` and `xbounds` for the performance
            benefits.
        yboundssrc
            Sets the source reference on plot.ly for  ybounds .
        ysrc
            Sets the source reference on plot.ly for  y .

        Returns
        -------
        Pointcloud
        """
        super(Pointcloud, self).__init__('pointcloud')

        # 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.Pointcloud 
constructor must be a dict or 
an instance of plotly.graph_objs.Pointcloud""")

        # Import validators
        # -----------------
        from plotly.validators import (pointcloud as v_pointcloud)

        # Initialize validators
        # ---------------------
        self._validators['customdata'] = v_pointcloud.CustomdataValidator()
        self._validators[
            'customdatasrc'] = v_pointcloud.CustomdatasrcValidator()
        self._validators['hoverinfo'] = v_pointcloud.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_pointcloud.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_pointcloud.HoverlabelValidator()
        self._validators['ids'] = v_pointcloud.IdsValidator()
        self._validators['idssrc'] = v_pointcloud.IdssrcValidator()
        self._validators['indices'] = v_pointcloud.IndicesValidator()
        self._validators['indicessrc'] = v_pointcloud.IndicessrcValidator()
        self._validators['legendgroup'] = v_pointcloud.LegendgroupValidator()
        self._validators['marker'] = v_pointcloud.MarkerValidator()
        self._validators['name'] = v_pointcloud.NameValidator()
        self._validators['opacity'] = v_pointcloud.OpacityValidator()
        self._validators[
            'selectedpoints'] = v_pointcloud.SelectedpointsValidator()
        self._validators['showlegend'] = v_pointcloud.ShowlegendValidator()
        self._validators['stream'] = v_pointcloud.StreamValidator()
        self._validators['text'] = v_pointcloud.TextValidator()
        self._validators['textsrc'] = v_pointcloud.TextsrcValidator()
        self._validators['uid'] = v_pointcloud.UidValidator()
        self._validators['visible'] = v_pointcloud.VisibleValidator()
        self._validators['x'] = v_pointcloud.XValidator()
        self._validators['xaxis'] = v_pointcloud.XAxisValidator()
        self._validators['xbounds'] = v_pointcloud.XboundsValidator()
        self._validators['xboundssrc'] = v_pointcloud.XboundssrcValidator()
        self._validators['xsrc'] = v_pointcloud.XsrcValidator()
        self._validators['xy'] = v_pointcloud.XyValidator()
        self._validators['xysrc'] = v_pointcloud.XysrcValidator()
        self._validators['y'] = v_pointcloud.YValidator()
        self._validators['yaxis'] = v_pointcloud.YAxisValidator()
        self._validators['ybounds'] = v_pointcloud.YboundsValidator()
        self._validators['yboundssrc'] = v_pointcloud.YboundssrcValidator()
        self._validators['ysrc'] = v_pointcloud.YsrcValidator()

        # Populate data dict with properties
        # ----------------------------------
        v = arg.pop('customdata', None)
        self.customdata = customdata if customdata is not None else v
        v = arg.pop('customdatasrc', None)
        self.customdatasrc = customdatasrc if customdatasrc is not None else v
        v = arg.pop('hoverinfo', None)
        self.hoverinfo = hoverinfo if hoverinfo is not None else v
        v = arg.pop('hoverinfosrc', None)
        self.hoverinfosrc = hoverinfosrc if hoverinfosrc is not None else v
        v = arg.pop('hoverlabel', None)
        self.hoverlabel = hoverlabel if hoverlabel is not None else v
        v = arg.pop('ids', None)
        self.ids = ids if ids is not None else v
        v = arg.pop('idssrc', None)
        self.idssrc = idssrc if idssrc is not None else v
        v = arg.pop('indices', None)
        self.indices = indices if indices is not None else v
        v = arg.pop('indicessrc', None)
        self.indicessrc = indicessrc if indicessrc is not None else v
        v = arg.pop('legendgroup', None)
        self.legendgroup = legendgroup if legendgroup is not None else v
        v = arg.pop('marker', None)
        self.marker = marker if marker is not None else v
        v = arg.pop('name', None)
        self.name = name if name is not None else v
        v = arg.pop('opacity', None)
        self.opacity = opacity if opacity is not None else v
        v = arg.pop('selectedpoints', None)
        self.selectedpoints = selectedpoints if selectedpoints is not None else v
        v = arg.pop('showlegend', None)
        self.showlegend = showlegend if showlegend is not None else v
        v = arg.pop('stream', None)
        self.stream = stream if stream is not None else v
        v = arg.pop('text', None)
        self.text = text if text is not None else v
        v = arg.pop('textsrc', None)
        self.textsrc = textsrc if textsrc is not None else v
        v = arg.pop('uid', None)
        self.uid = uid if uid is not None else v
        v = arg.pop('visible', None)
        self.visible = visible if visible is not None else v
        v = arg.pop('x', None)
        self.x = x if x is not None else v
        v = arg.pop('xaxis', None)
        self.xaxis = xaxis if xaxis is not None else v
        v = arg.pop('xbounds', None)
        self.xbounds = xbounds if xbounds is not None else v
        v = arg.pop('xboundssrc', None)
        self.xboundssrc = xboundssrc if xboundssrc is not None else v
        v = arg.pop('xsrc', None)
        self.xsrc = xsrc if xsrc is not None else v
        v = arg.pop('xy', None)
        self.xy = xy if xy is not None else v
        v = arg.pop('xysrc', None)
        self.xysrc = xysrc if xysrc is not None else v
        v = arg.pop('y', None)
        self.y = y if y is not None else v
        v = arg.pop('yaxis', None)
        self.yaxis = yaxis if yaxis is not None else v
        v = arg.pop('ybounds', None)
        self.ybounds = ybounds if ybounds is not None else v
        v = arg.pop('yboundssrc', None)
        self.yboundssrc = yboundssrc if yboundssrc is not None else v
        v = arg.pop('ysrc', None)
        self.ysrc = ysrc if ysrc is not None else v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'pointcloud'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='pointcloud')

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))
Пример #6
0
    def __init__(self,
                 arg=None,
                 customdata=None,
                 customdatasrc=None,
                 direction=None,
                 dlabel=None,
                 domain=None,
                 hole=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 hovertext=None,
                 hovertextsrc=None,
                 ids=None,
                 idssrc=None,
                 insidetextfont=None,
                 label0=None,
                 labels=None,
                 labelssrc=None,
                 legendgroup=None,
                 marker=None,
                 name=None,
                 opacity=None,
                 outsidetextfont=None,
                 pull=None,
                 pullsrc=None,
                 rotation=None,
                 scalegroup=None,
                 selectedpoints=None,
                 showlegend=None,
                 sort=None,
                 stream=None,
                 text=None,
                 textfont=None,
                 textinfo=None,
                 textposition=None,
                 textpositionsrc=None,
                 textsrc=None,
                 uid=None,
                 values=None,
                 valuessrc=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Pie object
        
        A data visualized by the sectors of the pie is set in `values`.
        The sector labels are set in `labels`. The sector colors are
        set in `marker.colors`

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Pie
        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 plot.ly for  customdata .
        direction
            Specifies the direction at which succeeding sectors
            follow one another.
        dlabel
            Sets the label step. See `label0` for more info.
        domain
            plotly.graph_objs.pie.Domain instance or dict with
            compatible properties
        hole
            Sets the fraction of the radius to cut out of the pie.
            Use this to make a donut chart.
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.pie.Hoverlabel instance or dict with
            compatible properties
        hovertext
            Sets hover text elements associated with each sector.
            If a single string, the same string appears for all
            data points. If an array of string, the items are
            mapped in order of this trace's sectors. To be seen,
            trace `hoverinfo` must contain a "text" flag.
        hovertextsrc
            Sets the source reference on plot.ly 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 plot.ly for  ids .
        insidetextfont
            Sets the font used for `textinfo` lying inside the pie.
        label0
            Alternate to `labels`. Builds a numeric set of labels.
            Use with `dlabel` where `label0` is the starting label
            and `dlabel` the step.
        labels
            Sets the sector labels. If `labels` entries are
            duplicated, we sum associated `values` or simply count
            occurrences if `values` is not provided. For other
            array attributes (including color) we use the first
            non-empty entry among all occurrences of the label.
        labelssrc
            Sets the source reference on plot.ly for  labels .
        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.
        marker
            plotly.graph_objs.pie.Marker instance or dict with
            compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        outsidetextfont
            Sets the font used for `textinfo` lying outside the
            pie.
        pull
            Sets the fraction of larger radius to pull the sectors
            out from the center. This can be a constant to pull all
            slices apart from each other equally or an array to
            highlight one or more slices.
        pullsrc
            Sets the source reference on plot.ly for  pull .
        rotation
            Instead of the first slice starting at 12 o'clock,
            rotate to some other angle.
        scalegroup
            If there are multiple pies that should be sized
            according to their totals, link them by providing a
            non-empty group id here shared by every trace in the
            same group.
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        sort
            Determines whether or not the sectors are reordered
            from largest to smallest.
        stream
            plotly.graph_objs.pie.Stream instance or dict with
            compatible properties
        text
            Sets text elements associated with each sector. If
            trace `textinfo` contains a "text" flag, these elements
            will seen on the chart. If trace `hoverinfo` contains a
            "text" flag and "hovertext" is not set, these elements
            will be seen in the hover labels.
        textfont
            Sets the font used for `textinfo`.
        textinfo
            Determines which trace information appear on the graph.
        textposition
            Specifies the location of the `textinfo`.
        textpositionsrc
            Sets the source reference on plot.ly for  textposition
            .
        textsrc
            Sets the source reference on plot.ly for  text .
        uid

        values
            Sets the values of the sectors of this pie chart. If
            omitted, we count occurrences of each label.
        valuessrc
            Sets the source reference on plot.ly for  values .
        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).

        Returns
        -------
        Pie
        """
        super(Pie, self).__init__('pie')

        # Validate arg
        # ------------
        if arg is None:
            arg = {}
        elif isinstance(arg, self.__class__):
            arg = arg.to_plotly_json()
        elif isinstance(arg, dict):
            arg = copy.copy(arg)
        else:
            raise ValueError("""\
The first argument to the plotly.graph_objs.Pie 
constructor must be a dict or 
an instance of plotly.graph_objs.Pie""")

        # Import validators
        # -----------------
        from plotly.validators import (pie as v_pie)

        # Initialize validators
        # ---------------------
        self._validators['customdata'] = v_pie.CustomdataValidator()
        self._validators['customdatasrc'] = v_pie.CustomdatasrcValidator()
        self._validators['direction'] = v_pie.DirectionValidator()
        self._validators['dlabel'] = v_pie.DlabelValidator()
        self._validators['domain'] = v_pie.DomainValidator()
        self._validators['hole'] = v_pie.HoleValidator()
        self._validators['hoverinfo'] = v_pie.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_pie.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_pie.HoverlabelValidator()
        self._validators['hovertext'] = v_pie.HovertextValidator()
        self._validators['hovertextsrc'] = v_pie.HovertextsrcValidator()
        self._validators['ids'] = v_pie.IdsValidator()
        self._validators['idssrc'] = v_pie.IdssrcValidator()
        self._validators['insidetextfont'] = v_pie.InsidetextfontValidator()
        self._validators['label0'] = v_pie.Label0Validator()
        self._validators['labels'] = v_pie.LabelsValidator()
        self._validators['labelssrc'] = v_pie.LabelssrcValidator()
        self._validators['legendgroup'] = v_pie.LegendgroupValidator()
        self._validators['marker'] = v_pie.MarkerValidator()
        self._validators['name'] = v_pie.NameValidator()
        self._validators['opacity'] = v_pie.OpacityValidator()
        self._validators['outsidetextfont'] = v_pie.OutsidetextfontValidator()
        self._validators['pull'] = v_pie.PullValidator()
        self._validators['pullsrc'] = v_pie.PullsrcValidator()
        self._validators['rotation'] = v_pie.RotationValidator()
        self._validators['scalegroup'] = v_pie.ScalegroupValidator()
        self._validators['selectedpoints'] = v_pie.SelectedpointsValidator()
        self._validators['showlegend'] = v_pie.ShowlegendValidator()
        self._validators['sort'] = v_pie.SortValidator()
        self._validators['stream'] = v_pie.StreamValidator()
        self._validators['text'] = v_pie.TextValidator()
        self._validators['textfont'] = v_pie.TextfontValidator()
        self._validators['textinfo'] = v_pie.TextinfoValidator()
        self._validators['textposition'] = v_pie.TextpositionValidator()
        self._validators['textpositionsrc'] = v_pie.TextpositionsrcValidator()
        self._validators['textsrc'] = v_pie.TextsrcValidator()
        self._validators['uid'] = v_pie.UidValidator()
        self._validators['values'] = v_pie.ValuesValidator()
        self._validators['valuessrc'] = v_pie.ValuessrcValidator()
        self._validators['visible'] = v_pie.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('customdata', None)
        self.customdata = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self.customdatasrc = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('direction', None)
        self.direction = direction if direction is not None else _v
        _v = arg.pop('dlabel', None)
        self.dlabel = dlabel if dlabel is not None else _v
        _v = arg.pop('domain', None)
        self.domain = domain if domain is not None else _v
        _v = arg.pop('hole', None)
        self.hole = hole if hole is not None else _v
        _v = arg.pop('hoverinfo', None)
        self.hoverinfo = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self.hoverinfosrc = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self.hoverlabel = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('hovertext', None)
        self.hovertext = hovertext if hovertext is not None else _v
        _v = arg.pop('hovertextsrc', None)
        self.hovertextsrc = hovertextsrc if hovertextsrc is not None else _v
        _v = arg.pop('ids', None)
        self.ids = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self.idssrc = idssrc if idssrc is not None else _v
        _v = arg.pop('insidetextfont', None)
        self.insidetextfont = insidetextfont if insidetextfont is not None else _v
        _v = arg.pop('label0', None)
        self.label0 = label0 if label0 is not None else _v
        _v = arg.pop('labels', None)
        self.labels = labels if labels is not None else _v
        _v = arg.pop('labelssrc', None)
        self.labelssrc = labelssrc if labelssrc is not None else _v
        _v = arg.pop('legendgroup', None)
        self.legendgroup = legendgroup if legendgroup is not None else _v
        _v = arg.pop('marker', None)
        self.marker = marker if marker is not None else _v
        _v = arg.pop('name', None)
        self.name = name if name is not None else _v
        _v = arg.pop('opacity', None)
        self.opacity = opacity if opacity is not None else _v
        _v = arg.pop('outsidetextfont', None)
        self.outsidetextfont = outsidetextfont if outsidetextfont is not None else _v
        _v = arg.pop('pull', None)
        self.pull = pull if pull is not None else _v
        _v = arg.pop('pullsrc', None)
        self.pullsrc = pullsrc if pullsrc is not None else _v
        _v = arg.pop('rotation', None)
        self.rotation = rotation if rotation is not None else _v
        _v = arg.pop('scalegroup', None)
        self.scalegroup = scalegroup if scalegroup is not None else _v
        _v = arg.pop('selectedpoints', None)
        self.selectedpoints = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self.showlegend = showlegend if showlegend is not None else _v
        _v = arg.pop('sort', None)
        self.sort = sort if sort is not None else _v
        _v = arg.pop('stream', None)
        self.stream = stream if stream is not None else _v
        _v = arg.pop('text', None)
        self.text = text if text is not None else _v
        _v = arg.pop('textfont', None)
        self.textfont = textfont if textfont is not None else _v
        _v = arg.pop('textinfo', None)
        self.textinfo = textinfo if textinfo is not None else _v
        _v = arg.pop('textposition', None)
        self.textposition = textposition if textposition is not None else _v
        _v = arg.pop('textpositionsrc', None)
        self.textpositionsrc = textpositionsrc if textpositionsrc is not None else _v
        _v = arg.pop('textsrc', None)
        self.textsrc = textsrc if textsrc is not None else _v
        _v = arg.pop('uid', None)
        self.uid = uid if uid is not None else _v
        _v = arg.pop('values', None)
        self.values = values if values is not None else _v
        _v = arg.pop('valuessrc', None)
        self.valuessrc = valuessrc if valuessrc is not None else _v
        _v = arg.pop('visible', None)
        self.visible = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'pie'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='pie',
                                                    val='pie')

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))
Пример #7
0
    def __init__(self,
                 arg=None,
                 customdata=None,
                 customdatasrc=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 ids=None,
                 idssrc=None,
                 legendgroup=None,
                 marker=None,
                 name=None,
                 opacity=None,
                 r=None,
                 rsrc=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 t=None,
                 tsrc=None,
                 uid=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Area object
        
        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Area
        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 plot.ly for  customdata .
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.area.Hoverlabel instance or dict with
            compatible properties
        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 plot.ly for  ids .
        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.
        marker
            plotly.graph_objs.area.Marker instance or dict with
            compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        r
            Area traces are deprecated! Please switch to the
            "barpolar" trace type. Sets the radial coordinates for
            legacy polar chart only.
        rsrc
            Sets the source reference on plot.ly for  r .
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.area.Stream instance or dict with
            compatible properties
        t
            Area traces are deprecated! Please switch to the
            "barpolar" trace type. Sets the angular coordinates for
            legacy polar chart only.
        tsrc
            Sets the source reference on plot.ly for  t .
        uid

        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).

        Returns
        -------
        Area
        """
        super(Area, self).__init__('area')

        # 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.Area 
constructor must be a dict or 
an instance of plotly.graph_objs.Area""")

        # Handle skip_invalid
        # -------------------
        self._skip_invalid = kwargs.pop('skip_invalid', False)

        # Import validators
        # -----------------
        from plotly.validators import (area as v_area)

        # Initialize validators
        # ---------------------
        self._validators['customdata'] = v_area.CustomdataValidator()
        self._validators['customdatasrc'] = v_area.CustomdatasrcValidator()
        self._validators['hoverinfo'] = v_area.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_area.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_area.HoverlabelValidator()
        self._validators['ids'] = v_area.IdsValidator()
        self._validators['idssrc'] = v_area.IdssrcValidator()
        self._validators['legendgroup'] = v_area.LegendgroupValidator()
        self._validators['marker'] = v_area.MarkerValidator()
        self._validators['name'] = v_area.NameValidator()
        self._validators['opacity'] = v_area.OpacityValidator()
        self._validators['r'] = v_area.RValidator()
        self._validators['rsrc'] = v_area.RsrcValidator()
        self._validators['selectedpoints'] = v_area.SelectedpointsValidator()
        self._validators['showlegend'] = v_area.ShowlegendValidator()
        self._validators['stream'] = v_area.StreamValidator()
        self._validators['t'] = v_area.TValidator()
        self._validators['tsrc'] = v_area.TsrcValidator()
        self._validators['uid'] = v_area.UidValidator()
        self._validators['visible'] = v_area.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('customdata', None)
        self['customdata'] = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self[
            'customdatasrc'] = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('hoverinfo', None)
        self['hoverinfo'] = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self['hoverinfosrc'] = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self['hoverlabel'] = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('ids', None)
        self['ids'] = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self['idssrc'] = idssrc if idssrc is not None else _v
        _v = arg.pop('legendgroup', None)
        self['legendgroup'] = legendgroup if legendgroup is not None else _v
        _v = arg.pop('marker', None)
        self['marker'] = marker if marker is not None else _v
        _v = arg.pop('name', None)
        self['name'] = name if name is not None else _v
        _v = arg.pop('opacity', None)
        self['opacity'] = opacity if opacity is not None else _v
        _v = arg.pop('r', None)
        self['r'] = r if r is not None else _v
        _v = arg.pop('rsrc', None)
        self['rsrc'] = rsrc if rsrc is not None else _v
        _v = arg.pop('selectedpoints', None)
        self[
            'selectedpoints'] = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self['showlegend'] = showlegend if showlegend is not None else _v
        _v = arg.pop('stream', None)
        self['stream'] = stream if stream is not None else _v
        _v = arg.pop('t', None)
        self['t'] = t if t is not None else _v
        _v = arg.pop('tsrc', None)
        self['tsrc'] = tsrc if tsrc is not None else _v
        _v = arg.pop('uid', None)
        self['uid'] = uid if uid is not None else _v
        _v = arg.pop('visible', None)
        self['visible'] = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'area'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='area',
                                                    val='area')

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))

        # Reset skip_invalid
        # ------------------
        self._skip_invalid = False
Пример #8
0
    def __init__(
        self,
        arg=None,
        autocolorscale=None,
        colorbar=None,
        colorscale=None,
        customdata=None,
        customdatasrc=None,
        geo=None,
        hoverinfo=None,
        hoverinfosrc=None,
        hoverlabel=None,
        ids=None,
        idssrc=None,
        legendgroup=None,
        locationmode=None,
        locations=None,
        locationssrc=None,
        marker=None,
        name=None,
        opacity=None,
        reversescale=None,
        selected=None,
        selectedpoints=None,
        showlegend=None,
        showscale=None,
        stream=None,
        text=None,
        textsrc=None,
        uid=None,
        unselected=None,
        visible=None,
        z=None,
        zauto=None,
        zmax=None,
        zmin=None,
        zsrc=None,
        **kwargs
    ):
        """
        Construct a new Choropleth object
        
        The data that describes the choropleth value-to-color mapping
        is set in `z`. The geographic locations corresponding to each
        value in `z` are set in `locations`.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Choropleth
        autocolorscale
            Determines whether or not the colorscale is picked
            using the sign of the input z values.
        colorbar
            plotly.graph_objs.choropleth.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 z space, use zmin and zmax
        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 plot.ly for  customdata .
        geo
            Sets a reference between this trace's geospatial
            coordinates and a geographic map. If *geo* (the default
            value), the geospatial coordinates refer to
            `layout.geo`. If *geo2*, the geospatial coordinates
            refer to `layout.geo2`, and so on.
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.choropleth.Hoverlabel instance or
            dict with compatible properties
        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 plot.ly for  ids .
        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.
        locationmode
            Determines the set of locations used to match entries
            in `locations` to regions on the map.
        locations
            Sets the coordinates via location IDs or names. See
            `locationmode` for more info.
        locationssrc
            Sets the source reference on plot.ly for  locations .
        marker
            plotly.graph_objs.choropleth.Marker instance or dict
            with compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        reversescale
            Reverses the colorscale.
        selected
            plotly.graph_objs.choropleth.Selected instance or dict
            with compatible properties
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        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.
        stream
            plotly.graph_objs.choropleth.Stream instance or dict
            with compatible properties
        text
            Sets the text elements associated with each location.
        textsrc
            Sets the source reference on plot.ly for  text .
        uid

        unselected
            plotly.graph_objs.choropleth.Unselected instance or
            dict with compatible properties
        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).
        z
            Sets the color values.
        zauto
            Determines the whether or not the color domain is
            computed with respect to the input data.
        zmax
            Sets the upper bound of color domain.
        zmin
            Sets the lower bound of color domain.
        zsrc
            Sets the source reference on plot.ly for  z .

        Returns
        -------
        Choropleth
        """
        super(Choropleth, self).__init__('choropleth')

        # Validate arg
        # ------------
        if arg is None:
            arg = {}
        elif isinstance(arg, self.__class__):
            arg = arg.to_plotly_json()
        elif isinstance(arg, dict):
            arg = copy.copy(arg)
        else:
            raise ValueError(
                """\
The first argument to the plotly.graph_objs.Choropleth 
constructor must be a dict or 
an instance of plotly.graph_objs.Choropleth"""
            )

        # Import validators
        # -----------------
        from plotly.validators import (choropleth as v_choropleth)

        # Initialize validators
        # ---------------------
        self._validators['autocolorscale'
                        ] = v_choropleth.AutocolorscaleValidator()
        self._validators['colorbar'] = v_choropleth.ColorBarValidator()
        self._validators['colorscale'] = v_choropleth.ColorscaleValidator()
        self._validators['customdata'] = v_choropleth.CustomdataValidator()
        self._validators['customdatasrc'
                        ] = v_choropleth.CustomdatasrcValidator()
        self._validators['geo'] = v_choropleth.GeoValidator()
        self._validators['hoverinfo'] = v_choropleth.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_choropleth.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_choropleth.HoverlabelValidator()
        self._validators['ids'] = v_choropleth.IdsValidator()
        self._validators['idssrc'] = v_choropleth.IdssrcValidator()
        self._validators['legendgroup'] = v_choropleth.LegendgroupValidator()
        self._validators['locationmode'] = v_choropleth.LocationmodeValidator()
        self._validators['locations'] = v_choropleth.LocationsValidator()
        self._validators['locationssrc'] = v_choropleth.LocationssrcValidator()
        self._validators['marker'] = v_choropleth.MarkerValidator()
        self._validators['name'] = v_choropleth.NameValidator()
        self._validators['opacity'] = v_choropleth.OpacityValidator()
        self._validators['reversescale'] = v_choropleth.ReversescaleValidator()
        self._validators['selected'] = v_choropleth.SelectedValidator()
        self._validators['selectedpoints'
                        ] = v_choropleth.SelectedpointsValidator()
        self._validators['showlegend'] = v_choropleth.ShowlegendValidator()
        self._validators['showscale'] = v_choropleth.ShowscaleValidator()
        self._validators['stream'] = v_choropleth.StreamValidator()
        self._validators['text'] = v_choropleth.TextValidator()
        self._validators['textsrc'] = v_choropleth.TextsrcValidator()
        self._validators['uid'] = v_choropleth.UidValidator()
        self._validators['unselected'] = v_choropleth.UnselectedValidator()
        self._validators['visible'] = v_choropleth.VisibleValidator()
        self._validators['z'] = v_choropleth.ZValidator()
        self._validators['zauto'] = v_choropleth.ZautoValidator()
        self._validators['zmax'] = v_choropleth.ZmaxValidator()
        self._validators['zmin'] = v_choropleth.ZminValidator()
        self._validators['zsrc'] = v_choropleth.ZsrcValidator()

        # Populate data dict with properties
        # ----------------------------------
        v = arg.pop('autocolorscale', None)
        self.autocolorscale = autocolorscale if autocolorscale is not None else v
        v = arg.pop('colorbar', None)
        self.colorbar = colorbar if colorbar is not None else v
        v = arg.pop('colorscale', None)
        self.colorscale = colorscale if colorscale is not None else v
        v = arg.pop('customdata', None)
        self.customdata = customdata if customdata is not None else v
        v = arg.pop('customdatasrc', None)
        self.customdatasrc = customdatasrc if customdatasrc is not None else v
        v = arg.pop('geo', None)
        self.geo = geo if geo is not None else v
        v = arg.pop('hoverinfo', None)
        self.hoverinfo = hoverinfo if hoverinfo is not None else v
        v = arg.pop('hoverinfosrc', None)
        self.hoverinfosrc = hoverinfosrc if hoverinfosrc is not None else v
        v = arg.pop('hoverlabel', None)
        self.hoverlabel = hoverlabel if hoverlabel is not None else v
        v = arg.pop('ids', None)
        self.ids = ids if ids is not None else v
        v = arg.pop('idssrc', None)
        self.idssrc = idssrc if idssrc is not None else v
        v = arg.pop('legendgroup', None)
        self.legendgroup = legendgroup if legendgroup is not None else v
        v = arg.pop('locationmode', None)
        self.locationmode = locationmode if locationmode is not None else v
        v = arg.pop('locations', None)
        self.locations = locations if locations is not None else v
        v = arg.pop('locationssrc', None)
        self.locationssrc = locationssrc if locationssrc is not None else v
        v = arg.pop('marker', None)
        self.marker = marker if marker is not None else v
        v = arg.pop('name', None)
        self.name = name if name is not None else v
        v = arg.pop('opacity', None)
        self.opacity = opacity if opacity is not None else v
        v = arg.pop('reversescale', None)
        self.reversescale = reversescale if reversescale is not None else v
        v = arg.pop('selected', None)
        self.selected = selected if selected is not None else v
        v = arg.pop('selectedpoints', None)
        self.selectedpoints = selectedpoints if selectedpoints is not None else v
        v = arg.pop('showlegend', None)
        self.showlegend = showlegend if showlegend is not None else v
        v = arg.pop('showscale', None)
        self.showscale = showscale if showscale is not None else v
        v = arg.pop('stream', None)
        self.stream = stream if stream is not None else v
        v = arg.pop('text', None)
        self.text = text if text is not None else v
        v = arg.pop('textsrc', None)
        self.textsrc = textsrc if textsrc is not None else v
        v = arg.pop('uid', None)
        self.uid = uid if uid is not None else v
        v = arg.pop('unselected', None)
        self.unselected = unselected if unselected is not None else v
        v = arg.pop('visible', None)
        self.visible = visible if visible is not None else v
        v = arg.pop('z', None)
        self.z = z if z is not None else v
        v = arg.pop('zauto', None)
        self.zauto = zauto if zauto is not None else v
        v = arg.pop('zmax', None)
        self.zmax = zmax if zmax is not None else v
        v = arg.pop('zmin', None)
        self.zmin = zmin if zmin is not None else v
        v = arg.pop('zsrc', None)
        self.zsrc = zsrc if zsrc is not None else v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'choropleth'
        self._validators['type'] = LiteralValidator(
            plotly_name='type', parent_name='choropleth'
        )

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))
Пример #9
0
    def __init__(self,
                 arg=None,
                 close=None,
                 closesrc=None,
                 customdata=None,
                 customdatasrc=None,
                 decreasing=None,
                 high=None,
                 highsrc=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 ids=None,
                 idssrc=None,
                 increasing=None,
                 legendgroup=None,
                 line=None,
                 low=None,
                 lowsrc=None,
                 name=None,
                 opacity=None,
                 open=None,
                 opensrc=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 text=None,
                 textsrc=None,
                 tickwidth=None,
                 uid=None,
                 visible=None,
                 x=None,
                 xaxis=None,
                 xcalendar=None,
                 xsrc=None,
                 yaxis=None,
                 **kwargs):
        """
        Construct a new Ohlc object
        
        The ohlc (short for Open-High-Low-Close) is a style of
        financial chart describing open, high, low and close for a
        given `x` coordinate (most likely time). The tip of the lines
        represent the `low` and `high` values and the horizontal
        segments represent the `open` and `close` values. Sample points
        where the close value is higher (lower) then the open value are
        called increasing (decreasing). By default, increasing items
        are drawn in green whereas decreasing are drawn in red.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Ohlc
        close
            Sets the close values.
        closesrc
            Sets the source reference on plot.ly for  close .
        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 plot.ly for  customdata .
        decreasing
            plotly.graph_objs.ohlc.Decreasing instance or dict with
            compatible properties
        high
            Sets the high values.
        highsrc
            Sets the source reference on plot.ly for  high .
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.ohlc.Hoverlabel instance or dict with
            compatible properties
        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 plot.ly for  ids .
        increasing
            plotly.graph_objs.ohlc.Increasing instance or dict with
            compatible properties
        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.
        line
            plotly.graph_objs.ohlc.Line instance or dict with
            compatible properties
        low
            Sets the low values.
        lowsrc
            Sets the source reference on plot.ly for  low .
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        open
            Sets the open values.
        opensrc
            Sets the source reference on plot.ly for  open .
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.ohlc.Stream instance or dict with
            compatible properties
        text
            Sets hover text elements associated with each sample
            point. If a single string, the same string appears over
            all the data points. If an array of string, the items
            are mapped in order to this trace's sample points.
        textsrc
            Sets the source reference on plot.ly for  text .
        tickwidth
            Sets the width of the open/close tick marks relative to
            the "x" minimal interval.
        uid

        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. If absent, linear coordinate
            will be generated.
        xaxis
            Sets a reference between this trace's x coordinates and
            a 2D cartesian x axis. If "x" (the default value), the
            x coordinates refer to `layout.xaxis`. If "x2", the x
            coordinates refer to `layout.xaxis2`, and so on.
        xcalendar
            Sets the calendar system to use with `x` date data.
        xsrc
            Sets the source reference on plot.ly for  x .
        yaxis
            Sets a reference between this trace's y coordinates and
            a 2D cartesian y axis. If "y" (the default value), the
            y coordinates refer to `layout.yaxis`. If "y2", the y
            coordinates refer to `layout.yaxis2`, and so on.

        Returns
        -------
        Ohlc
        """
        super(Ohlc, self).__init__('ohlc')

        # 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.Ohlc 
constructor must be a dict or 
an instance of plotly.graph_objs.Ohlc""")

        # Handle skip_invalid
        # -------------------
        self._skip_invalid = kwargs.pop('skip_invalid', False)

        # Import validators
        # -----------------
        from plotly.validators import (ohlc as v_ohlc)

        # Initialize validators
        # ---------------------
        self._validators['close'] = v_ohlc.CloseValidator()
        self._validators['closesrc'] = v_ohlc.ClosesrcValidator()
        self._validators['customdata'] = v_ohlc.CustomdataValidator()
        self._validators['customdatasrc'] = v_ohlc.CustomdatasrcValidator()
        self._validators['decreasing'] = v_ohlc.DecreasingValidator()
        self._validators['high'] = v_ohlc.HighValidator()
        self._validators['highsrc'] = v_ohlc.HighsrcValidator()
        self._validators['hoverinfo'] = v_ohlc.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_ohlc.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_ohlc.HoverlabelValidator()
        self._validators['ids'] = v_ohlc.IdsValidator()
        self._validators['idssrc'] = v_ohlc.IdssrcValidator()
        self._validators['increasing'] = v_ohlc.IncreasingValidator()
        self._validators['legendgroup'] = v_ohlc.LegendgroupValidator()
        self._validators['line'] = v_ohlc.LineValidator()
        self._validators['low'] = v_ohlc.LowValidator()
        self._validators['lowsrc'] = v_ohlc.LowsrcValidator()
        self._validators['name'] = v_ohlc.NameValidator()
        self._validators['opacity'] = v_ohlc.OpacityValidator()
        self._validators['open'] = v_ohlc.OpenValidator()
        self._validators['opensrc'] = v_ohlc.OpensrcValidator()
        self._validators['selectedpoints'] = v_ohlc.SelectedpointsValidator()
        self._validators['showlegend'] = v_ohlc.ShowlegendValidator()
        self._validators['stream'] = v_ohlc.StreamValidator()
        self._validators['text'] = v_ohlc.TextValidator()
        self._validators['textsrc'] = v_ohlc.TextsrcValidator()
        self._validators['tickwidth'] = v_ohlc.TickwidthValidator()
        self._validators['uid'] = v_ohlc.UidValidator()
        self._validators['visible'] = v_ohlc.VisibleValidator()
        self._validators['x'] = v_ohlc.XValidator()
        self._validators['xaxis'] = v_ohlc.XAxisValidator()
        self._validators['xcalendar'] = v_ohlc.XcalendarValidator()
        self._validators['xsrc'] = v_ohlc.XsrcValidator()
        self._validators['yaxis'] = v_ohlc.YAxisValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('close', None)
        self['close'] = close if close is not None else _v
        _v = arg.pop('closesrc', None)
        self['closesrc'] = closesrc if closesrc is not None else _v
        _v = arg.pop('customdata', None)
        self['customdata'] = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self[
            'customdatasrc'] = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('decreasing', None)
        self['decreasing'] = decreasing if decreasing is not None else _v
        _v = arg.pop('high', None)
        self['high'] = high if high is not None else _v
        _v = arg.pop('highsrc', None)
        self['highsrc'] = highsrc if highsrc is not None else _v
        _v = arg.pop('hoverinfo', None)
        self['hoverinfo'] = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self['hoverinfosrc'] = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self['hoverlabel'] = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('ids', None)
        self['ids'] = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self['idssrc'] = idssrc if idssrc is not None else _v
        _v = arg.pop('increasing', None)
        self['increasing'] = increasing if increasing is not None else _v
        _v = arg.pop('legendgroup', None)
        self['legendgroup'] = legendgroup if legendgroup is not None else _v
        _v = arg.pop('line', None)
        self['line'] = line if line is not None else _v
        _v = arg.pop('low', None)
        self['low'] = low if low is not None else _v
        _v = arg.pop('lowsrc', None)
        self['lowsrc'] = lowsrc if lowsrc is not None else _v
        _v = arg.pop('name', None)
        self['name'] = name if name is not None else _v
        _v = arg.pop('opacity', None)
        self['opacity'] = opacity if opacity is not None else _v
        _v = arg.pop('open', None)
        self['open'] = open if open is not None else _v
        _v = arg.pop('opensrc', None)
        self['opensrc'] = opensrc if opensrc is not None else _v
        _v = arg.pop('selectedpoints', None)
        self[
            'selectedpoints'] = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self['showlegend'] = showlegend if showlegend is not None else _v
        _v = arg.pop('stream', None)
        self['stream'] = stream if stream is not None else _v
        _v = arg.pop('text', None)
        self['text'] = text if text is not None else _v
        _v = arg.pop('textsrc', None)
        self['textsrc'] = textsrc if textsrc is not None else _v
        _v = arg.pop('tickwidth', None)
        self['tickwidth'] = tickwidth if tickwidth is not None else _v
        _v = arg.pop('uid', None)
        self['uid'] = uid if uid is not None else _v
        _v = arg.pop('visible', None)
        self['visible'] = visible if visible is not None else _v
        _v = arg.pop('x', None)
        self['x'] = x if x is not None else _v
        _v = arg.pop('xaxis', None)
        self['xaxis'] = xaxis if xaxis is not None else _v
        _v = arg.pop('xcalendar', None)
        self['xcalendar'] = xcalendar if xcalendar is not None else _v
        _v = arg.pop('xsrc', None)
        self['xsrc'] = xsrc if xsrc is not None else _v
        _v = arg.pop('yaxis', None)
        self['yaxis'] = yaxis if yaxis is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'ohlc'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='ohlc',
                                                    val='ohlc')
        arg.pop('type', None)

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))

        # Reset skip_invalid
        # ------------------
        self._skip_invalid = False
Пример #10
0
    def __init__(self,
                 arg=None,
                 connectgaps=None,
                 customdata=None,
                 customdatasrc=None,
                 fill=None,
                 fillcolor=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 hoveron=None,
                 ids=None,
                 idssrc=None,
                 legendgroup=None,
                 line=None,
                 marker=None,
                 mode=None,
                 name=None,
                 opacity=None,
                 r=None,
                 rsrc=None,
                 selected=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 subplot=None,
                 text=None,
                 textsrc=None,
                 theta=None,
                 thetasrc=None,
                 thetaunit=None,
                 uid=None,
                 unselected=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Scatterpolargl object
        
        The scatterpolargl trace type encompasses line charts, scatter
        charts, and bubble charts in polar coordinates using the WebGL
        plotting engine. The data visualized as scatter point or lines
        is set in `r` (radial) and `theta` (angular) coordinates Bubble
        charts are achieved by setting `marker.size` and/or
        `marker.color` to numerical arrays.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Scatterpolargl
        connectgaps
            Determines whether or not gaps (i.e. {nan} or missing
            values) in the provided data arrays are connected.
        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 plot.ly for  customdata .
        fill
            Sets the area to fill with a solid color. Use with
            `fillcolor` if not *none*. *tozerox* and *tozeroy* fill
            to x=0 and y=0 respectively. *tonextx* and *tonexty*
            fill between the endpoints of this trace and the
            endpoints of the trace before it, connecting those
            endpoints with straight lines (to make a stacked area
            graph); if there is no trace before it, they behave
            like *tozerox* and *tozeroy*. *toself* connects the
            endpoints of the trace (or each segment of the trace if
            it has gaps) into a closed shape. *tonext* fills the
            space between two traces if one completely encloses the
            other (eg consecutive contour lines), and behaves like
            *toself* if there is no trace before it. *tonext*
            should not be used if one trace does not enclose the
            other.
        fillcolor
            Sets the fill color. Defaults to a half-transparent
            variant of the line color, marker color, or marker line
            color, whichever is available.
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.scatterpolargl.Hoverlabel instance or
            dict with compatible properties
        hoveron
            Do the hover effects highlight individual points
            (markers or line points) or do they highlight filled
            regions? If the fill is *toself* or *tonext* and there
            are no markers or text, then the default is *fills*,
            otherwise it is *points*.
        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 plot.ly for  ids .
        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.
        line
            plotly.graph_objs.scatterpolargl.Line instance or dict
            with compatible properties
        marker
            plotly.graph_objs.scatterpolargl.Marker instance or
            dict with compatible properties
        mode
            Determines the drawing mode for this scatter trace. If
            the provided `mode` includes *text* then the `text`
            elements appear at the coordinates. Otherwise, the
            `text` elements appear on hover. If there are less than
            20 points, then the default is *lines+markers*.
            Otherwise, *lines*.
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        r
            Sets the radial coordinates
        rsrc
            Sets the source reference on plot.ly for  r .
        selected
            plotly.graph_objs.scatterpolargl.Selected instance or
            dict with compatible properties
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.scatterpolargl.Stream instance or
            dict with compatible properties
        subplot
            Sets a reference between this trace's data coordinates
            and a polar subplot. If *polar* (the default value),
            the data refer to `layout.polar`. If *polar2*, the data
            refer to `layout.polar2`, and so on.
        text
            Sets text elements associated with each (x,y) pair. If
            a single string, the same string appears over all the
            data points. If an array of string, the items are
            mapped in order to the this trace's (x,y) coordinates.
            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 plot.ly for  text .
        theta
            Sets the angular coordinates
        thetasrc
            Sets the source reference on plot.ly for  theta .
        thetaunit
            Sets the unit of input *theta* values. Has an effect
            only when on *linear* angular axes.
        uid

        unselected
            plotly.graph_objs.scatterpolargl.Unselected instance or
            dict with compatible properties
        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).

        Returns
        -------
        Scatterpolargl
        """
        super(Scatterpolargl, self).__init__('scatterpolargl')

        # 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.Scatterpolargl 
constructor must be a dict or 
an instance of plotly.graph_objs.Scatterpolargl""")

        # Import validators
        # -----------------
        from plotly.validators import (scatterpolargl as v_scatterpolargl)

        # Initialize validators
        # ---------------------
        self._validators[
            'connectgaps'] = v_scatterpolargl.ConnectgapsValidator()
        self._validators['customdata'] = v_scatterpolargl.CustomdataValidator()
        self._validators[
            'customdatasrc'] = v_scatterpolargl.CustomdatasrcValidator()
        self._validators['fill'] = v_scatterpolargl.FillValidator()
        self._validators['fillcolor'] = v_scatterpolargl.FillcolorValidator()
        self._validators['hoverinfo'] = v_scatterpolargl.HoverinfoValidator()
        self._validators[
            'hoverinfosrc'] = v_scatterpolargl.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_scatterpolargl.HoverlabelValidator()
        self._validators['hoveron'] = v_scatterpolargl.HoveronValidator()
        self._validators['ids'] = v_scatterpolargl.IdsValidator()
        self._validators['idssrc'] = v_scatterpolargl.IdssrcValidator()
        self._validators[
            'legendgroup'] = v_scatterpolargl.LegendgroupValidator()
        self._validators['line'] = v_scatterpolargl.LineValidator()
        self._validators['marker'] = v_scatterpolargl.MarkerValidator()
        self._validators['mode'] = v_scatterpolargl.ModeValidator()
        self._validators['name'] = v_scatterpolargl.NameValidator()
        self._validators['opacity'] = v_scatterpolargl.OpacityValidator()
        self._validators['r'] = v_scatterpolargl.RValidator()
        self._validators['rsrc'] = v_scatterpolargl.RsrcValidator()
        self._validators['selected'] = v_scatterpolargl.SelectedValidator()
        self._validators[
            'selectedpoints'] = v_scatterpolargl.SelectedpointsValidator()
        self._validators['showlegend'] = v_scatterpolargl.ShowlegendValidator()
        self._validators['stream'] = v_scatterpolargl.StreamValidator()
        self._validators['subplot'] = v_scatterpolargl.SubplotValidator()
        self._validators['text'] = v_scatterpolargl.TextValidator()
        self._validators['textsrc'] = v_scatterpolargl.TextsrcValidator()
        self._validators['theta'] = v_scatterpolargl.ThetaValidator()
        self._validators['thetasrc'] = v_scatterpolargl.ThetasrcValidator()
        self._validators['thetaunit'] = v_scatterpolargl.ThetaunitValidator()
        self._validators['uid'] = v_scatterpolargl.UidValidator()
        self._validators['unselected'] = v_scatterpolargl.UnselectedValidator()
        self._validators['visible'] = v_scatterpolargl.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('connectgaps', None)
        self.connectgaps = connectgaps if connectgaps is not None else _v
        _v = arg.pop('customdata', None)
        self.customdata = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self.customdatasrc = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('fill', None)
        self.fill = fill if fill is not None else _v
        _v = arg.pop('fillcolor', None)
        self.fillcolor = fillcolor if fillcolor is not None else _v
        _v = arg.pop('hoverinfo', None)
        self.hoverinfo = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self.hoverinfosrc = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self.hoverlabel = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('hoveron', None)
        self.hoveron = hoveron if hoveron is not None else _v
        _v = arg.pop('ids', None)
        self.ids = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self.idssrc = idssrc if idssrc is not None else _v
        _v = arg.pop('legendgroup', None)
        self.legendgroup = legendgroup if legendgroup is not None else _v
        _v = arg.pop('line', None)
        self.line = line if line is not None else _v
        _v = arg.pop('marker', None)
        self.marker = marker if marker is not None else _v
        _v = arg.pop('mode', None)
        self.mode = mode if mode is not None else _v
        _v = arg.pop('name', None)
        self.name = name if name is not None else _v
        _v = arg.pop('opacity', None)
        self.opacity = opacity if opacity is not None else _v
        _v = arg.pop('r', None)
        self.r = r if r is not None else _v
        _v = arg.pop('rsrc', None)
        self.rsrc = rsrc if rsrc is not None else _v
        _v = arg.pop('selected', None)
        self.selected = selected if selected is not None else _v
        _v = arg.pop('selectedpoints', None)
        self.selectedpoints = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self.showlegend = showlegend if showlegend is not None else _v
        _v = arg.pop('stream', None)
        self.stream = stream if stream is not None else _v
        _v = arg.pop('subplot', None)
        self.subplot = subplot if subplot is not None else _v
        _v = arg.pop('text', None)
        self.text = text if text is not None else _v
        _v = arg.pop('textsrc', None)
        self.textsrc = textsrc if textsrc is not None else _v
        _v = arg.pop('theta', None)
        self.theta = theta if theta is not None else _v
        _v = arg.pop('thetasrc', None)
        self.thetasrc = thetasrc if thetasrc is not None else _v
        _v = arg.pop('thetaunit', None)
        self.thetaunit = thetaunit if thetaunit is not None else _v
        _v = arg.pop('uid', None)
        self.uid = uid if uid is not None else _v
        _v = arg.pop('unselected', None)
        self.unselected = unselected if unselected is not None else _v
        _v = arg.pop('visible', None)
        self.visible = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'scatterpolargl'
        self._validators['type'] = LiteralValidator(
            plotly_name='type', parent_name='scatterpolargl')

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))
Пример #11
0
    def __init__(self,
                 arg=None,
                 arrangement=None,
                 bundlecolors=None,
                 counts=None,
                 countssrc=None,
                 dimensions=None,
                 dimensiondefaults=None,
                 domain=None,
                 hoverinfo=None,
                 hoveron=None,
                 hovertemplate=None,
                 labelfont=None,
                 line=None,
                 name=None,
                 sortpaths=None,
                 stream=None,
                 tickfont=None,
                 uid=None,
                 uirevision=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Parcats object
        
        Parallel categories diagram for multidimensional categorical
        data.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Parcats
        arrangement
            Sets the drag interaction mode for categories and
            dimensions. If `perpendicular`, the categories can only
            move along a line perpendicular to the paths. If
            `freeform`, the categories can freely move on the
            plane. If `fixed`, the categories and dimensions are
            stationary.
        bundlecolors
            Sort paths so that like colors are bundled together
            within each category.
        counts
            The number of observations represented by each state.
            Defaults to 1 so that each state represents one
            observation
        countssrc
            Sets the source reference on plot.ly for  counts .
        dimensions
            The dimensions (variables) of the parallel categories
            diagram.
        dimensiondefaults
            When used in a template (as
            layout.template.data.parcats.dimensiondefaults), sets
            the default property values to use for elements of
            parcats.dimensions
        domain
            plotly.graph_objs.parcats.Domain instance or dict with
            compatible properties
        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.
        hoveron
            Sets the hover interaction mode for the parcats
            diagram. If `category`, hover interaction take place
            per category. If `color`, hover interactions take place
            per color per category. If `dimension`, hover
            interactions take place across all categories per
            dimension.
        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}". See https://github.com/d3/d3-format
            /blob/master/README.md#locale_format for details on the
            formatting syntax. The variables available in
            `hovertemplate` are the ones emitted as event data
            described at this link
            https://plot.ly/javascript/plotlyjs-events/#event-data.
            Additionally, every attributes that can be specified
            per-point (the ones that are `arrayOk: true`) are
            available. variables `count`, `probability`,
            `category`, `categorycount`, `colorcount` and
            `bandcolorcount`. Anything contained in tag `<extra>`
            is displayed in the secondary box, for example
            "<extra>{fullData.name}</extra>".
        labelfont
            Sets the font for the `dimension` labels.
        line
            plotly.graph_objs.parcats.Line instance or dict with
            compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        sortpaths
            Sets the path sorting algorithm. If `forward`, sort
            paths based on dimension categories from left to right.
            If `backward`, sort paths based on dimensions
            categories from right to left.
        stream
            plotly.graph_objs.parcats.Stream instance or dict with
            compatible properties
        tickfont
            Sets the font for the `category` labels.
        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.
        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).

        Returns
        -------
        Parcats
        """
        super(Parcats, self).__init__('parcats')

        # 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.Parcats 
constructor must be a dict or 
an instance of plotly.graph_objs.Parcats""")

        # Handle skip_invalid
        # -------------------
        self._skip_invalid = kwargs.pop('skip_invalid', False)

        # Import validators
        # -----------------
        from plotly.validators import (parcats as v_parcats)

        # Initialize validators
        # ---------------------
        self._validators['arrangement'] = v_parcats.ArrangementValidator()
        self._validators['bundlecolors'] = v_parcats.BundlecolorsValidator()
        self._validators['counts'] = v_parcats.CountsValidator()
        self._validators['countssrc'] = v_parcats.CountssrcValidator()
        self._validators['dimensions'] = v_parcats.DimensionsValidator()
        self._validators['dimensiondefaults'] = v_parcats.DimensionValidator()
        self._validators['domain'] = v_parcats.DomainValidator()
        self._validators['hoverinfo'] = v_parcats.HoverinfoValidator()
        self._validators['hoveron'] = v_parcats.HoveronValidator()
        self._validators['hovertemplate'] = v_parcats.HovertemplateValidator()
        self._validators['labelfont'] = v_parcats.LabelfontValidator()
        self._validators['line'] = v_parcats.LineValidator()
        self._validators['name'] = v_parcats.NameValidator()
        self._validators['sortpaths'] = v_parcats.SortpathsValidator()
        self._validators['stream'] = v_parcats.StreamValidator()
        self._validators['tickfont'] = v_parcats.TickfontValidator()
        self._validators['uid'] = v_parcats.UidValidator()
        self._validators['uirevision'] = v_parcats.UirevisionValidator()
        self._validators['visible'] = v_parcats.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('arrangement', None)
        self['arrangement'] = arrangement if arrangement is not None else _v
        _v = arg.pop('bundlecolors', None)
        self['bundlecolors'] = bundlecolors if bundlecolors is not None else _v
        _v = arg.pop('counts', None)
        self['counts'] = counts if counts is not None else _v
        _v = arg.pop('countssrc', None)
        self['countssrc'] = countssrc if countssrc is not None else _v
        _v = arg.pop('dimensions', None)
        self['dimensions'] = dimensions if dimensions is not None else _v
        _v = arg.pop('dimensiondefaults', None)
        self[
            'dimensiondefaults'] = dimensiondefaults if dimensiondefaults is not None else _v
        _v = arg.pop('domain', None)
        self['domain'] = domain if domain is not None else _v
        _v = arg.pop('hoverinfo', None)
        self['hoverinfo'] = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoveron', None)
        self['hoveron'] = hoveron if hoveron is not None else _v
        _v = arg.pop('hovertemplate', None)
        self[
            'hovertemplate'] = hovertemplate if hovertemplate is not None else _v
        _v = arg.pop('labelfont', None)
        self['labelfont'] = labelfont if labelfont is not None else _v
        _v = arg.pop('line', None)
        self['line'] = line if line is not None else _v
        _v = arg.pop('name', None)
        self['name'] = name if name is not None else _v
        _v = arg.pop('sortpaths', None)
        self['sortpaths'] = sortpaths if sortpaths is not None else _v
        _v = arg.pop('stream', None)
        self['stream'] = stream if stream is not None else _v
        _v = arg.pop('tickfont', None)
        self['tickfont'] = tickfont if tickfont is not None else _v
        _v = arg.pop('uid', None)
        self['uid'] = uid if uid is not None else _v
        _v = arg.pop('uirevision', None)
        self['uirevision'] = uirevision if uirevision is not None else _v
        _v = arg.pop('visible', None)
        self['visible'] = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'parcats'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='parcats',
                                                    val='parcats')
        arg.pop('type', None)

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))

        # Reset skip_invalid
        # ------------------
        self._skip_invalid = False
Пример #12
0
    def __init__(self,
                 arg=None,
                 arrangement=None,
                 bundlecolors=None,
                 counts=None,
                 countssrc=None,
                 dimensions=None,
                 dimensiondefaults=None,
                 domain=None,
                 hoverinfo=None,
                 hoveron=None,
                 labelfont=None,
                 line=None,
                 name=None,
                 sortpaths=None,
                 stream=None,
                 tickfont=None,
                 uid=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Parcats object
        
        Parallel categories diagram for multidimensional categorical
        data.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Parcats
        arrangement
            Sets the drag interaction mode for categories and
            dimensions. If `perpendicular`, the categories can only
            move along a line perpendicular to the paths. If
            `freeform`, the categories can freely move on the
            plane. If `fixed`, the categories and dimensions are
            stationary.
        bundlecolors
            Sort paths so that like colors are bundled together
            within each category.
        counts
            The number of observations represented by each state.
            Defaults to 1 so that each state represents one
            observation
        countssrc
            Sets the source reference on plot.ly for  counts .
        dimensions
            The dimensions (variables) of the parallel categories
            diagram.
        dimensiondefaults
            When used in a template (as
            layout.template.data.parcats.dimensiondefaults), sets
            the default property values to use for elements of
            parcats.dimensions
        domain
            plotly.graph_objs.parcats.Domain instance or dict with
            compatible properties
        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.
        hoveron
            Sets the hover interaction mode for the parcats
            diagram. If `category`, hover interaction take place
            per category. If `color`, hover interactions take place
            per color per category. If `dimension`, hover
            interactions take place across all categories per
            dimension.
        labelfont
            Sets the font for the `dimension` labels.
        line
            plotly.graph_objs.parcats.Line instance or dict with
            compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        sortpaths
            Sets the path sorting algorithm. If `forward`, sort
            paths based on dimension categories from left to right.
            If `backward`, sort paths based on dimensions
            categories from right to left.
        stream
            plotly.graph_objs.parcats.Stream instance or dict with
            compatible properties
        tickfont
            Sets the font for the `category` labels.
        uid

        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).

        Returns
        -------
        Parcats
        """
        super(Parcats, self).__init__('parcats')

        # 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.Parcats 
constructor must be a dict or 
an instance of plotly.graph_objs.Parcats""")

        # Handle skip_invalid
        # -------------------
        self._skip_invalid = kwargs.pop('skip_invalid', False)

        # Import validators
        # -----------------
        from plotly.validators import (parcats as v_parcats)

        # Initialize validators
        # ---------------------
        self._validators['arrangement'] = v_parcats.ArrangementValidator()
        self._validators['bundlecolors'] = v_parcats.BundlecolorsValidator()
        self._validators['counts'] = v_parcats.CountsValidator()
        self._validators['countssrc'] = v_parcats.CountssrcValidator()
        self._validators['dimensions'] = v_parcats.DimensionsValidator()
        self._validators['dimensiondefaults'] = v_parcats.DimensionValidator()
        self._validators['domain'] = v_parcats.DomainValidator()
        self._validators['hoverinfo'] = v_parcats.HoverinfoValidator()
        self._validators['hoveron'] = v_parcats.HoveronValidator()
        self._validators['labelfont'] = v_parcats.LabelfontValidator()
        self._validators['line'] = v_parcats.LineValidator()
        self._validators['name'] = v_parcats.NameValidator()
        self._validators['sortpaths'] = v_parcats.SortpathsValidator()
        self._validators['stream'] = v_parcats.StreamValidator()
        self._validators['tickfont'] = v_parcats.TickfontValidator()
        self._validators['uid'] = v_parcats.UidValidator()
        self._validators['visible'] = v_parcats.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('arrangement', None)
        self['arrangement'] = arrangement if arrangement is not None else _v
        _v = arg.pop('bundlecolors', None)
        self['bundlecolors'] = bundlecolors if bundlecolors is not None else _v
        _v = arg.pop('counts', None)
        self['counts'] = counts if counts is not None else _v
        _v = arg.pop('countssrc', None)
        self['countssrc'] = countssrc if countssrc is not None else _v
        _v = arg.pop('dimensions', None)
        self['dimensions'] = dimensions if dimensions is not None else _v
        _v = arg.pop('dimensiondefaults', None)
        self[
            'dimensiondefaults'] = dimensiondefaults if dimensiondefaults is not None else _v
        _v = arg.pop('domain', None)
        self['domain'] = domain if domain is not None else _v
        _v = arg.pop('hoverinfo', None)
        self['hoverinfo'] = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoveron', None)
        self['hoveron'] = hoveron if hoveron is not None else _v
        _v = arg.pop('labelfont', None)
        self['labelfont'] = labelfont if labelfont is not None else _v
        _v = arg.pop('line', None)
        self['line'] = line if line is not None else _v
        _v = arg.pop('name', None)
        self['name'] = name if name is not None else _v
        _v = arg.pop('sortpaths', None)
        self['sortpaths'] = sortpaths if sortpaths is not None else _v
        _v = arg.pop('stream', None)
        self['stream'] = stream if stream is not None else _v
        _v = arg.pop('tickfont', None)
        self['tickfont'] = tickfont if tickfont is not None else _v
        _v = arg.pop('uid', None)
        self['uid'] = uid if uid is not None else _v
        _v = arg.pop('visible', None)
        self['visible'] = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'parcats'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='parcats',
                                                    val='parcats')
        arg.pop('type', None)

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))

        # Reset skip_invalid
        # ------------------
        self._skip_invalid = False
Пример #13
0
    def __init__(self,
                 arg=None,
                 base=None,
                 basesrc=None,
                 customdata=None,
                 customdatasrc=None,
                 dr=None,
                 dtheta=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 ids=None,
                 idssrc=None,
                 legendgroup=None,
                 marker=None,
                 name=None,
                 offset=None,
                 offsetsrc=None,
                 opacity=None,
                 r=None,
                 r0=None,
                 rsrc=None,
                 selected=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 subplot=None,
                 text=None,
                 textsrc=None,
                 theta=None,
                 theta0=None,
                 thetasrc=None,
                 thetaunit=None,
                 uid=None,
                 unselected=None,
                 visible=None,
                 width=None,
                 widthsrc=None,
                 **kwargs):
        """
        Construct a new Barpolar object
        
        The data visualized by the radial span of the bars is set in
        `r`

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Barpolar
        base
            Sets where the bar base is drawn (in radial axis
            units). In "stack" barmode, traces that set "base" will
            be excluded and drawn in "overlay" mode instead.
        basesrc
            Sets the source reference on plot.ly for  base .
        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 plot.ly for  customdata .
        dr
            Sets the r coordinate step.
        dtheta
            Sets the theta coordinate step. By default, the
            `dtheta` step equals the subplot's period divided by
            the length of the `r` coordinates.
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.barpolar.Hoverlabel instance or dict
            with compatible properties
        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 plot.ly for  ids .
        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.
        marker
            plotly.graph_objs.barpolar.Marker instance or dict with
            compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        offset
            Shifts the angular position where the bar is drawn (in
            "thetatunit" units).
        offsetsrc
            Sets the source reference on plot.ly for  offset .
        opacity
            Sets the opacity of the trace.
        r
            Sets the radial coordinates
        r0
            Alternate to `r`. Builds a linear space of r
            coordinates. Use with `dr` where `r0` is the starting
            coordinate and `dr` the step.
        rsrc
            Sets the source reference on plot.ly for  r .
        selected
            plotly.graph_objs.barpolar.Selected instance or dict
            with compatible properties
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.barpolar.Stream instance or dict with
            compatible properties
        subplot
            Sets a reference between this trace's data coordinates
            and a polar subplot. If "polar" (the default value),
            the data refer to `layout.polar`. If "polar2", the data
            refer to `layout.polar2`, and so on.
        text
            Sets hover text elements associated with each bar. If a
            single string, the same string appears over all bars.
            If an array of string, the items are mapped in order to
            the this trace's coordinates.
        textsrc
            Sets the source reference on plot.ly for  text .
        theta
            Sets the angular coordinates
        theta0
            Alternate to `theta`. Builds a linear space of theta
            coordinates. Use with `dtheta` where `theta0` is the
            starting coordinate and `dtheta` the step.
        thetasrc
            Sets the source reference on plot.ly for  theta .
        thetaunit
            Sets the unit of input "theta" values. Has an effect
            only when on "linear" angular axes.
        uid

        unselected
            plotly.graph_objs.barpolar.Unselected instance or dict
            with compatible properties
        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).
        width
            Sets the bar angular width (in "thetaunit" units).
        widthsrc
            Sets the source reference on plot.ly for  width .

        Returns
        -------
        Barpolar
        """
        super(Barpolar, self).__init__('barpolar')

        # 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.Barpolar 
constructor must be a dict or 
an instance of plotly.graph_objs.Barpolar""")

        # Handle skip_invalid
        # -------------------
        self._skip_invalid = kwargs.pop('skip_invalid', False)

        # Import validators
        # -----------------
        from plotly.validators import (barpolar as v_barpolar)

        # Initialize validators
        # ---------------------
        self._validators['base'] = v_barpolar.BaseValidator()
        self._validators['basesrc'] = v_barpolar.BasesrcValidator()
        self._validators['customdata'] = v_barpolar.CustomdataValidator()
        self._validators['customdatasrc'] = v_barpolar.CustomdatasrcValidator()
        self._validators['dr'] = v_barpolar.DrValidator()
        self._validators['dtheta'] = v_barpolar.DthetaValidator()
        self._validators['hoverinfo'] = v_barpolar.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_barpolar.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_barpolar.HoverlabelValidator()
        self._validators['ids'] = v_barpolar.IdsValidator()
        self._validators['idssrc'] = v_barpolar.IdssrcValidator()
        self._validators['legendgroup'] = v_barpolar.LegendgroupValidator()
        self._validators['marker'] = v_barpolar.MarkerValidator()
        self._validators['name'] = v_barpolar.NameValidator()
        self._validators['offset'] = v_barpolar.OffsetValidator()
        self._validators['offsetsrc'] = v_barpolar.OffsetsrcValidator()
        self._validators['opacity'] = v_barpolar.OpacityValidator()
        self._validators['r'] = v_barpolar.RValidator()
        self._validators['r0'] = v_barpolar.R0Validator()
        self._validators['rsrc'] = v_barpolar.RsrcValidator()
        self._validators['selected'] = v_barpolar.SelectedValidator()
        self._validators[
            'selectedpoints'] = v_barpolar.SelectedpointsValidator()
        self._validators['showlegend'] = v_barpolar.ShowlegendValidator()
        self._validators['stream'] = v_barpolar.StreamValidator()
        self._validators['subplot'] = v_barpolar.SubplotValidator()
        self._validators['text'] = v_barpolar.TextValidator()
        self._validators['textsrc'] = v_barpolar.TextsrcValidator()
        self._validators['theta'] = v_barpolar.ThetaValidator()
        self._validators['theta0'] = v_barpolar.Theta0Validator()
        self._validators['thetasrc'] = v_barpolar.ThetasrcValidator()
        self._validators['thetaunit'] = v_barpolar.ThetaunitValidator()
        self._validators['uid'] = v_barpolar.UidValidator()
        self._validators['unselected'] = v_barpolar.UnselectedValidator()
        self._validators['visible'] = v_barpolar.VisibleValidator()
        self._validators['width'] = v_barpolar.WidthValidator()
        self._validators['widthsrc'] = v_barpolar.WidthsrcValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('base', None)
        self['base'] = base if base is not None else _v
        _v = arg.pop('basesrc', None)
        self['basesrc'] = basesrc if basesrc is not None else _v
        _v = arg.pop('customdata', None)
        self['customdata'] = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self[
            'customdatasrc'] = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('dr', None)
        self['dr'] = dr if dr is not None else _v
        _v = arg.pop('dtheta', None)
        self['dtheta'] = dtheta if dtheta is not None else _v
        _v = arg.pop('hoverinfo', None)
        self['hoverinfo'] = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self['hoverinfosrc'] = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self['hoverlabel'] = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('ids', None)
        self['ids'] = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self['idssrc'] = idssrc if idssrc is not None else _v
        _v = arg.pop('legendgroup', None)
        self['legendgroup'] = legendgroup if legendgroup is not None else _v
        _v = arg.pop('marker', None)
        self['marker'] = marker if marker is not None else _v
        _v = arg.pop('name', None)
        self['name'] = name if name is not None else _v
        _v = arg.pop('offset', None)
        self['offset'] = offset if offset is not None else _v
        _v = arg.pop('offsetsrc', None)
        self['offsetsrc'] = offsetsrc if offsetsrc is not None else _v
        _v = arg.pop('opacity', None)
        self['opacity'] = opacity if opacity is not None else _v
        _v = arg.pop('r', None)
        self['r'] = r if r is not None else _v
        _v = arg.pop('r0', None)
        self['r0'] = r0 if r0 is not None else _v
        _v = arg.pop('rsrc', None)
        self['rsrc'] = rsrc if rsrc is not None else _v
        _v = arg.pop('selected', None)
        self['selected'] = selected if selected is not None else _v
        _v = arg.pop('selectedpoints', None)
        self[
            'selectedpoints'] = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self['showlegend'] = showlegend if showlegend is not None else _v
        _v = arg.pop('stream', None)
        self['stream'] = stream if stream is not None else _v
        _v = arg.pop('subplot', None)
        self['subplot'] = subplot if subplot is not None else _v
        _v = arg.pop('text', None)
        self['text'] = text if text is not None else _v
        _v = arg.pop('textsrc', None)
        self['textsrc'] = textsrc if textsrc is not None else _v
        _v = arg.pop('theta', None)
        self['theta'] = theta if theta is not None else _v
        _v = arg.pop('theta0', None)
        self['theta0'] = theta0 if theta0 is not None else _v
        _v = arg.pop('thetasrc', None)
        self['thetasrc'] = thetasrc if thetasrc is not None else _v
        _v = arg.pop('thetaunit', None)
        self['thetaunit'] = thetaunit if thetaunit is not None else _v
        _v = arg.pop('uid', None)
        self['uid'] = uid if uid is not None else _v
        _v = arg.pop('unselected', None)
        self['unselected'] = unselected if unselected is not None else _v
        _v = arg.pop('visible', None)
        self['visible'] = visible if visible is not None else _v
        _v = arg.pop('width', None)
        self['width'] = width if width is not None else _v
        _v = arg.pop('widthsrc', None)
        self['widthsrc'] = widthsrc if widthsrc is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'barpolar'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='barpolar',
                                                    val='barpolar')

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))

        # Reset skip_invalid
        # ------------------
        self._skip_invalid = False
def validator():
    return LiteralValidator("prop", "parent", "scatter")
Пример #15
0
    def __init__(self,
                 arg=None,
                 customdata=None,
                 customdatasrc=None,
                 diagonal=None,
                 dimensions=None,
                 dimensiondefaults=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 ids=None,
                 idssrc=None,
                 legendgroup=None,
                 marker=None,
                 name=None,
                 opacity=None,
                 selected=None,
                 selectedpoints=None,
                 showlegend=None,
                 showlowerhalf=None,
                 showupperhalf=None,
                 stream=None,
                 text=None,
                 textsrc=None,
                 uid=None,
                 unselected=None,
                 visible=None,
                 xaxes=None,
                 yaxes=None,
                 **kwargs):
        """
        Construct a new Splom object
        
        Splom traces generate scatter plot matrix visualizations. Each
        splom `dimensions` items correspond to a generated axis. Values
        for each of those dimensions are set in `dimensions[i].values`.
        Splom traces support all `scattergl` marker style attributes.
        Specify `layout.grid` attributes and/or layout x-axis and
        y-axis attributes for more control over the axis positioning
        and style.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Splom
        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 plot.ly for  customdata .
        diagonal
            plotly.graph_objs.splom.Diagonal instance or dict with
            compatible properties
        dimensions
            plotly.graph_objs.splom.Dimension instance or dict with
            compatible properties
        dimensiondefaults
            When used in a template (as
            layout.template.data.splom.dimensiondefaults), sets the
            default property values to use for elements of
            splom.dimensions
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.splom.Hoverlabel instance or dict
            with compatible properties
        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 plot.ly for  ids .
        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.
        marker
            plotly.graph_objs.splom.Marker instance or dict with
            compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        selected
            plotly.graph_objs.splom.Selected instance or dict with
            compatible properties
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        showlowerhalf
            Determines whether or not subplots on the lower half
            from the diagonal are displayed.
        showupperhalf
            Determines whether or not subplots on the upper half
            from the diagonal are displayed.
        stream
            plotly.graph_objs.splom.Stream instance or dict with
            compatible properties
        text
            Sets text elements associated with each (x,y) pair to
            appear on hover. If a single string, the same string
            appears over all the data points. If an array of
            string, the items are mapped in order to the this
            trace's (x,y) coordinates.
        textsrc
            Sets the source reference on plot.ly for  text .
        uid

        unselected
            plotly.graph_objs.splom.Unselected instance or dict
            with compatible properties
        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).
        xaxes
            Sets the list of x axes corresponding to dimensions of
            this splom trace. By default, a splom will match the
            first N xaxes where N is the number of input
            dimensions. Note that, in case where `diagonal.visible`
            is false and `showupperhalf` or `showlowerhalf` is
            false, this splom trace will generate one less x-axis
            and one less y-axis.
        yaxes
            Sets the list of y axes corresponding to dimensions of
            this splom trace. By default, a splom will match the
            first N yaxes where N is the number of input
            dimensions. Note that, in case where `diagonal.visible`
            is false and `showupperhalf` or `showlowerhalf` is
            false, this splom trace will generate one less x-axis
            and one less y-axis.

        Returns
        -------
        Splom
        """
        super(Splom, self).__init__('splom')

        # 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.Splom 
constructor must be a dict or 
an instance of plotly.graph_objs.Splom""")

        # Handle skip_invalid
        # -------------------
        self._skip_invalid = kwargs.pop('skip_invalid', False)

        # Import validators
        # -----------------
        from plotly.validators import (splom as v_splom)

        # Initialize validators
        # ---------------------
        self._validators['customdata'] = v_splom.CustomdataValidator()
        self._validators['customdatasrc'] = v_splom.CustomdatasrcValidator()
        self._validators['diagonal'] = v_splom.DiagonalValidator()
        self._validators['dimensions'] = v_splom.DimensionsValidator()
        self._validators['dimensiondefaults'] = v_splom.DimensionValidator()
        self._validators['hoverinfo'] = v_splom.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_splom.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_splom.HoverlabelValidator()
        self._validators['ids'] = v_splom.IdsValidator()
        self._validators['idssrc'] = v_splom.IdssrcValidator()
        self._validators['legendgroup'] = v_splom.LegendgroupValidator()
        self._validators['marker'] = v_splom.MarkerValidator()
        self._validators['name'] = v_splom.NameValidator()
        self._validators['opacity'] = v_splom.OpacityValidator()
        self._validators['selected'] = v_splom.SelectedValidator()
        self._validators['selectedpoints'] = v_splom.SelectedpointsValidator()
        self._validators['showlegend'] = v_splom.ShowlegendValidator()
        self._validators['showlowerhalf'] = v_splom.ShowlowerhalfValidator()
        self._validators['showupperhalf'] = v_splom.ShowupperhalfValidator()
        self._validators['stream'] = v_splom.StreamValidator()
        self._validators['text'] = v_splom.TextValidator()
        self._validators['textsrc'] = v_splom.TextsrcValidator()
        self._validators['uid'] = v_splom.UidValidator()
        self._validators['unselected'] = v_splom.UnselectedValidator()
        self._validators['visible'] = v_splom.VisibleValidator()
        self._validators['xaxes'] = v_splom.XaxesValidator()
        self._validators['yaxes'] = v_splom.YaxesValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('customdata', None)
        self['customdata'] = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self[
            'customdatasrc'] = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('diagonal', None)
        self['diagonal'] = diagonal if diagonal is not None else _v
        _v = arg.pop('dimensions', None)
        self['dimensions'] = dimensions if dimensions is not None else _v
        _v = arg.pop('dimensiondefaults', None)
        self[
            'dimensiondefaults'] = dimensiondefaults if dimensiondefaults is not None else _v
        _v = arg.pop('hoverinfo', None)
        self['hoverinfo'] = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self['hoverinfosrc'] = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self['hoverlabel'] = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('ids', None)
        self['ids'] = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self['idssrc'] = idssrc if idssrc is not None else _v
        _v = arg.pop('legendgroup', None)
        self['legendgroup'] = legendgroup if legendgroup is not None else _v
        _v = arg.pop('marker', None)
        self['marker'] = marker if marker is not None else _v
        _v = arg.pop('name', None)
        self['name'] = name if name is not None else _v
        _v = arg.pop('opacity', None)
        self['opacity'] = opacity if opacity is not None else _v
        _v = arg.pop('selected', None)
        self['selected'] = selected if selected is not None else _v
        _v = arg.pop('selectedpoints', None)
        self[
            'selectedpoints'] = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self['showlegend'] = showlegend if showlegend is not None else _v
        _v = arg.pop('showlowerhalf', None)
        self[
            'showlowerhalf'] = showlowerhalf if showlowerhalf is not None else _v
        _v = arg.pop('showupperhalf', None)
        self[
            'showupperhalf'] = showupperhalf if showupperhalf is not None else _v
        _v = arg.pop('stream', None)
        self['stream'] = stream if stream is not None else _v
        _v = arg.pop('text', None)
        self['text'] = text if text is not None else _v
        _v = arg.pop('textsrc', None)
        self['textsrc'] = textsrc if textsrc is not None else _v
        _v = arg.pop('uid', None)
        self['uid'] = uid if uid is not None else _v
        _v = arg.pop('unselected', None)
        self['unselected'] = unselected if unselected is not None else _v
        _v = arg.pop('visible', None)
        self['visible'] = visible if visible is not None else _v
        _v = arg.pop('xaxes', None)
        self['xaxes'] = xaxes if xaxes is not None else _v
        _v = arg.pop('yaxes', None)
        self['yaxes'] = yaxes if yaxes is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'splom'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='splom',
                                                    val='splom')
        arg.pop('type', None)

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))

        # Reset skip_invalid
        # ------------------
        self._skip_invalid = False
Пример #16
0
    def __init__(self,
                 arg=None,
                 customdata=None,
                 customdatasrc=None,
                 dimensions=None,
                 domain=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 hoverlabel=None,
                 ids=None,
                 idssrc=None,
                 labelfont=None,
                 legendgroup=None,
                 line=None,
                 name=None,
                 opacity=None,
                 rangefont=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 tickfont=None,
                 uid=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Parcoords object
        
        Parallel coordinates for multidimensional exploratory data
        analysis. The samples are specified in `dimensions`. The colors
        are set in `line.color`.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Parcoords
        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 plot.ly for  customdata .
        dimensions
            The dimensions (variables) of the parallel coordinates
            chart. 2..60 dimensions are supported.
        domain
            plotly.graph_objs.parcoords.Domain instance or dict
            with compatible properties
        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 plot.ly for  hoverinfo .
        hoverlabel
            plotly.graph_objs.parcoords.Hoverlabel instance or dict
            with compatible properties
        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 plot.ly for  ids .
        labelfont
            Sets the font for the `dimension` labels.
        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.
        line
            plotly.graph_objs.parcoords.Line instance or dict with
            compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        rangefont
            Sets the font for the `dimension` range values.
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.parcoords.Stream instance or dict
            with compatible properties
        tickfont
            Sets the font for the `dimension` tick values.
        uid

        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).

        Returns
        -------
        Parcoords
        """
        super(Parcoords, self).__init__('parcoords')

        # 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.Parcoords 
constructor must be a dict or 
an instance of plotly.graph_objs.Parcoords""")

        # Import validators
        # -----------------
        from plotly.validators import (parcoords as v_parcoords)

        # Initialize validators
        # ---------------------
        self._validators['customdata'] = v_parcoords.CustomdataValidator()
        self._validators['customdatasrc'] = v_parcoords.CustomdatasrcValidator(
        )
        self._validators['dimensions'] = v_parcoords.DimensionsValidator()
        self._validators['domain'] = v_parcoords.DomainValidator()
        self._validators['hoverinfo'] = v_parcoords.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_parcoords.HoverinfosrcValidator()
        self._validators['hoverlabel'] = v_parcoords.HoverlabelValidator()
        self._validators['ids'] = v_parcoords.IdsValidator()
        self._validators['idssrc'] = v_parcoords.IdssrcValidator()
        self._validators['labelfont'] = v_parcoords.LabelfontValidator()
        self._validators['legendgroup'] = v_parcoords.LegendgroupValidator()
        self._validators['line'] = v_parcoords.LineValidator()
        self._validators['name'] = v_parcoords.NameValidator()
        self._validators['opacity'] = v_parcoords.OpacityValidator()
        self._validators['rangefont'] = v_parcoords.RangefontValidator()
        self._validators[
            'selectedpoints'] = v_parcoords.SelectedpointsValidator()
        self._validators['showlegend'] = v_parcoords.ShowlegendValidator()
        self._validators['stream'] = v_parcoords.StreamValidator()
        self._validators['tickfont'] = v_parcoords.TickfontValidator()
        self._validators['uid'] = v_parcoords.UidValidator()
        self._validators['visible'] = v_parcoords.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('customdata', None)
        self.customdata = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self.customdatasrc = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('dimensions', None)
        self.dimensions = dimensions if dimensions is not None else _v
        _v = arg.pop('domain', None)
        self.domain = domain if domain is not None else _v
        _v = arg.pop('hoverinfo', None)
        self.hoverinfo = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self.hoverinfosrc = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('hoverlabel', None)
        self.hoverlabel = hoverlabel if hoverlabel is not None else _v
        _v = arg.pop('ids', None)
        self.ids = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self.idssrc = idssrc if idssrc is not None else _v
        _v = arg.pop('labelfont', None)
        self.labelfont = labelfont if labelfont is not None else _v
        _v = arg.pop('legendgroup', None)
        self.legendgroup = legendgroup if legendgroup is not None else _v
        _v = arg.pop('line', None)
        self.line = line if line is not None else _v
        _v = arg.pop('name', None)
        self.name = name if name is not None else _v
        _v = arg.pop('opacity', None)
        self.opacity = opacity if opacity is not None else _v
        _v = arg.pop('rangefont', None)
        self.rangefont = rangefont if rangefont is not None else _v
        _v = arg.pop('selectedpoints', None)
        self.selectedpoints = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self.showlegend = showlegend if showlegend is not None else _v
        _v = arg.pop('stream', None)
        self.stream = stream if stream is not None else _v
        _v = arg.pop('tickfont', None)
        self.tickfont = tickfont if tickfont is not None else _v
        _v = arg.pop('uid', None)
        self.uid = uid if uid is not None else _v
        _v = arg.pop('visible', None)
        self.visible = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'parcoords'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='parcoords')

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))
Пример #17
0
    def __init__(self,
                 arg=None,
                 customdata=None,
                 customdatasrc=None,
                 dimensions=None,
                 dimensiondefaults=None,
                 domain=None,
                 hoverinfo=None,
                 hoverinfosrc=None,
                 ids=None,
                 idssrc=None,
                 labelfont=None,
                 legendgroup=None,
                 line=None,
                 name=None,
                 opacity=None,
                 rangefont=None,
                 selectedpoints=None,
                 showlegend=None,
                 stream=None,
                 tickfont=None,
                 uid=None,
                 uirevision=None,
                 visible=None,
                 **kwargs):
        """
        Construct a new Parcoords object
        
        Parallel coordinates for multidimensional exploratory data
        analysis. The samples are specified in `dimensions`. The colors
        are set in `line.color`.

        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of plotly.graph_objs.Parcoords
        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 plot.ly for  customdata .
        dimensions
            The dimensions (variables) of the parallel coordinates
            chart. 2..60 dimensions are supported.
        dimensiondefaults
            When used in a template (as
            layout.template.data.parcoords.dimensiondefaults), sets
            the default property values to use for elements of
            parcoords.dimensions
        domain
            plotly.graph_objs.parcoords.Domain instance or dict
            with compatible properties
        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 plot.ly for  hoverinfo .
        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 plot.ly for  ids .
        labelfont
            Sets the font for the `dimension` labels.
        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.
        line
            plotly.graph_objs.parcoords.Line instance or dict with
            compatible properties
        name
            Sets the trace name. The trace name appear as the
            legend item and on hover.
        opacity
            Sets the opacity of the trace.
        rangefont
            Sets the font for the `dimension` range values.
        selectedpoints
            Array containing integer indices of selected points.
            Has an effect only for traces that support selections.
            Note that an empty array means an empty selection where
            the `unselected` are turned on for all points, whereas,
            any other non-array values means no selection all where
            the `selected` and `unselected` styles have no effect.
        showlegend
            Determines whether or not an item corresponding to this
            trace is shown in the legend.
        stream
            plotly.graph_objs.parcoords.Stream instance or dict
            with compatible properties
        tickfont
            Sets the font for the `dimension` tick values.
        uid

        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.
        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).

        Returns
        -------
        Parcoords
        """
        super(Parcoords, self).__init__('parcoords')

        # 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.Parcoords 
constructor must be a dict or 
an instance of plotly.graph_objs.Parcoords""")

        # Handle skip_invalid
        # -------------------
        self._skip_invalid = kwargs.pop('skip_invalid', False)

        # Import validators
        # -----------------
        from plotly.validators import (parcoords as v_parcoords)

        # Initialize validators
        # ---------------------
        self._validators['customdata'] = v_parcoords.CustomdataValidator()
        self._validators['customdatasrc'] = v_parcoords.CustomdatasrcValidator(
        )
        self._validators['dimensions'] = v_parcoords.DimensionsValidator()
        self._validators['dimensiondefaults'] = v_parcoords.DimensionValidator(
        )
        self._validators['domain'] = v_parcoords.DomainValidator()
        self._validators['hoverinfo'] = v_parcoords.HoverinfoValidator()
        self._validators['hoverinfosrc'] = v_parcoords.HoverinfosrcValidator()
        self._validators['ids'] = v_parcoords.IdsValidator()
        self._validators['idssrc'] = v_parcoords.IdssrcValidator()
        self._validators['labelfont'] = v_parcoords.LabelfontValidator()
        self._validators['legendgroup'] = v_parcoords.LegendgroupValidator()
        self._validators['line'] = v_parcoords.LineValidator()
        self._validators['name'] = v_parcoords.NameValidator()
        self._validators['opacity'] = v_parcoords.OpacityValidator()
        self._validators['rangefont'] = v_parcoords.RangefontValidator()
        self._validators[
            'selectedpoints'] = v_parcoords.SelectedpointsValidator()
        self._validators['showlegend'] = v_parcoords.ShowlegendValidator()
        self._validators['stream'] = v_parcoords.StreamValidator()
        self._validators['tickfont'] = v_parcoords.TickfontValidator()
        self._validators['uid'] = v_parcoords.UidValidator()
        self._validators['uirevision'] = v_parcoords.UirevisionValidator()
        self._validators['visible'] = v_parcoords.VisibleValidator()

        # Populate data dict with properties
        # ----------------------------------
        _v = arg.pop('customdata', None)
        self['customdata'] = customdata if customdata is not None else _v
        _v = arg.pop('customdatasrc', None)
        self[
            'customdatasrc'] = customdatasrc if customdatasrc is not None else _v
        _v = arg.pop('dimensions', None)
        self['dimensions'] = dimensions if dimensions is not None else _v
        _v = arg.pop('dimensiondefaults', None)
        self[
            'dimensiondefaults'] = dimensiondefaults if dimensiondefaults is not None else _v
        _v = arg.pop('domain', None)
        self['domain'] = domain if domain is not None else _v
        _v = arg.pop('hoverinfo', None)
        self['hoverinfo'] = hoverinfo if hoverinfo is not None else _v
        _v = arg.pop('hoverinfosrc', None)
        self['hoverinfosrc'] = hoverinfosrc if hoverinfosrc is not None else _v
        _v = arg.pop('ids', None)
        self['ids'] = ids if ids is not None else _v
        _v = arg.pop('idssrc', None)
        self['idssrc'] = idssrc if idssrc is not None else _v
        _v = arg.pop('labelfont', None)
        self['labelfont'] = labelfont if labelfont is not None else _v
        _v = arg.pop('legendgroup', None)
        self['legendgroup'] = legendgroup if legendgroup is not None else _v
        _v = arg.pop('line', None)
        self['line'] = line if line is not None else _v
        _v = arg.pop('name', None)
        self['name'] = name if name is not None else _v
        _v = arg.pop('opacity', None)
        self['opacity'] = opacity if opacity is not None else _v
        _v = arg.pop('rangefont', None)
        self['rangefont'] = rangefont if rangefont is not None else _v
        _v = arg.pop('selectedpoints', None)
        self[
            'selectedpoints'] = selectedpoints if selectedpoints is not None else _v
        _v = arg.pop('showlegend', None)
        self['showlegend'] = showlegend if showlegend is not None else _v
        _v = arg.pop('stream', None)
        self['stream'] = stream if stream is not None else _v
        _v = arg.pop('tickfont', None)
        self['tickfont'] = tickfont if tickfont is not None else _v
        _v = arg.pop('uid', None)
        self['uid'] = uid if uid is not None else _v
        _v = arg.pop('uirevision', None)
        self['uirevision'] = uirevision if uirevision is not None else _v
        _v = arg.pop('visible', None)
        self['visible'] = visible if visible is not None else _v

        # Read-only literals
        # ------------------
        from _plotly_utils.basevalidators import LiteralValidator
        self._props['type'] = 'parcoords'
        self._validators['type'] = LiteralValidator(plotly_name='type',
                                                    parent_name='parcoords',
                                                    val='parcoords')
        arg.pop('type', None)

        # Process unknown kwargs
        # ----------------------
        self._process_kwargs(**dict(arg, **kwargs))

        # Reset skip_invalid
        # ------------------
        self._skip_invalid = False
Пример #18
0
def validator():
    return LiteralValidator('prop', 'parent', 'scatter')