1from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
2import copy as _copy
3
4
5class Marker(_BaseTraceHierarchyType):
6
7    # class properties
8    # --------------------
9    _parent_path_str = "violin.unselected"
10    _path_str = "violin.unselected.marker"
11    _valid_props = {"color", "opacity", "size"}
12
13    # color
14    # -----
15    @property
16    def color(self):
17        """
18        Sets the marker color of unselected points, applied only when a
19        selection exists.
20
21        The 'color' property is a color and may be specified as:
22          - A hex string (e.g. '#ff0000')
23          - An rgb/rgba string (e.g. 'rgb(255,0,0)')
24          - An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
25          - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
26          - A named CSS color:
27                aliceblue, antiquewhite, aqua, aquamarine, azure,
28                beige, bisque, black, blanchedalmond, blue,
29                blueviolet, brown, burlywood, cadetblue,
30                chartreuse, chocolate, coral, cornflowerblue,
31                cornsilk, crimson, cyan, darkblue, darkcyan,
32                darkgoldenrod, darkgray, darkgrey, darkgreen,
33                darkkhaki, darkmagenta, darkolivegreen, darkorange,
34                darkorchid, darkred, darksalmon, darkseagreen,
35                darkslateblue, darkslategray, darkslategrey,
36                darkturquoise, darkviolet, deeppink, deepskyblue,
37                dimgray, dimgrey, dodgerblue, firebrick,
38                floralwhite, forestgreen, fuchsia, gainsboro,
39                ghostwhite, gold, goldenrod, gray, grey, green,
40                greenyellow, honeydew, hotpink, indianred, indigo,
41                ivory, khaki, lavender, lavenderblush, lawngreen,
42                lemonchiffon, lightblue, lightcoral, lightcyan,
43                lightgoldenrodyellow, lightgray, lightgrey,
44                lightgreen, lightpink, lightsalmon, lightseagreen,
45                lightskyblue, lightslategray, lightslategrey,
46                lightsteelblue, lightyellow, lime, limegreen,
47                linen, magenta, maroon, mediumaquamarine,
48                mediumblue, mediumorchid, mediumpurple,
49                mediumseagreen, mediumslateblue, mediumspringgreen,
50                mediumturquoise, mediumvioletred, midnightblue,
51                mintcream, mistyrose, moccasin, navajowhite, navy,
52                oldlace, olive, olivedrab, orange, orangered,
53                orchid, palegoldenrod, palegreen, paleturquoise,
54                palevioletred, papayawhip, peachpuff, peru, pink,
55                plum, powderblue, purple, red, rosybrown,
56                royalblue, rebeccapurple, saddlebrown, salmon,
57                sandybrown, seagreen, seashell, sienna, silver,
58                skyblue, slateblue, slategray, slategrey, snow,
59                springgreen, steelblue, tan, teal, thistle, tomato,
60                turquoise, violet, wheat, white, whitesmoke,
61                yellow, yellowgreen
62
63        Returns
64        -------
65        str
66        """
67        return self["color"]
68
69    @color.setter
70    def color(self, val):
71        self["color"] = val
72
73    # opacity
74    # -------
75    @property
76    def opacity(self):
77        """
78        Sets the marker opacity of unselected points, applied only when
79        a selection exists.
80
81        The 'opacity' property is a number and may be specified as:
82          - An int or float in the interval [0, 1]
83
84        Returns
85        -------
86        int|float
87        """
88        return self["opacity"]
89
90    @opacity.setter
91    def opacity(self, val):
92        self["opacity"] = val
93
94    # size
95    # ----
96    @property
97    def size(self):
98        """
99        Sets the marker size of unselected points, applied only when a
100        selection exists.
101
102        The 'size' property is a number and may be specified as:
103          - An int or float in the interval [0, inf]
104
105        Returns
106        -------
107        int|float
108        """
109        return self["size"]
110
111    @size.setter
112    def size(self, val):
113        self["size"] = val
114
115    # Self properties description
116    # ---------------------------
117    @property
118    def _prop_descriptions(self):
119        return """\
120        color
121            Sets the marker color of unselected points, applied
122            only when a selection exists.
123        opacity
124            Sets the marker opacity of unselected points, applied
125            only when a selection exists.
126        size
127            Sets the marker size of unselected points, applied only
128            when a selection exists.
129        """
130
131    def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs):
132        """
133        Construct a new Marker object
134
135        Parameters
136        ----------
137        arg
138            dict of properties compatible with this constructor or
139            an instance of
140            :class:`plotly.graph_objs.violin.unselected.Marker`
141        color
142            Sets the marker color of unselected points, applied
143            only when a selection exists.
144        opacity
145            Sets the marker opacity of unselected points, applied
146            only when a selection exists.
147        size
148            Sets the marker size of unselected points, applied only
149            when a selection exists.
150
151        Returns
152        -------
153        Marker
154        """
155        super(Marker, self).__init__("marker")
156
157        if "_parent" in kwargs:
158            self._parent = kwargs["_parent"]
159            return
160
161        # Validate arg
162        # ------------
163        if arg is None:
164            arg = {}
165        elif isinstance(arg, self.__class__):
166            arg = arg.to_plotly_json()
167        elif isinstance(arg, dict):
168            arg = _copy.copy(arg)
169        else:
170            raise ValueError(
171                """\
172The first argument to the plotly.graph_objs.violin.unselected.Marker
173constructor must be a dict or
174an instance of :class:`plotly.graph_objs.violin.unselected.Marker`"""
175            )
176
177        # Handle skip_invalid
178        # -------------------
179        self._skip_invalid = kwargs.pop("skip_invalid", False)
180        self._validate = kwargs.pop("_validate", True)
181
182        # Populate data dict with properties
183        # ----------------------------------
184        _v = arg.pop("color", None)
185        _v = color if color is not None else _v
186        if _v is not None:
187            self["color"] = _v
188        _v = arg.pop("opacity", None)
189        _v = opacity if opacity is not None else _v
190        if _v is not None:
191            self["opacity"] = _v
192        _v = arg.pop("size", None)
193        _v = size if size is not None else _v
194        if _v is not None:
195            self["size"] = _v
196
197        # Process unknown kwargs
198        # ----------------------
199        self._process_kwargs(**dict(arg, **kwargs))
200
201        # Reset skip_invalid
202        # ------------------
203        self._skip_invalid = False
204