MCPcopy Index your code
hub / github.com/plotly/plotly.py / update

Method update

plotly/io/_orca.py:180–228  ·  view source on GitHub ↗

Update one or more properties from a dict or from input keyword arguments. Parameters ---------- d: dict Dictionary from property names to new property values. kwargs Named argument value pairs where the name is a configurati

(self, d={}, **kwargs)

Source from the content-addressed store, hash-verified

178 reset_status()
179
180 def update(self, d={}, **kwargs):
181 """
182 Update one or more properties from a dict or from input keyword
183 arguments.
184
185 Parameters
186 ----------
187 d: dict
188 Dictionary from property names to new property values.
189
190 kwargs
191 Named argument value pairs where the name is a configuration
192 property name and the value is the new property value.
193
194 Returns
195 -------
196 None
197
198 Examples
199 --------
200 Update configuration properties using a dictionary
201
202 >>> import plotly.io as pio
203 >>> pio.orca.config.update({'timeout': 30, 'default_format': 'svg'})
204
205 Update configuration properties using keyword arguments
206
207 >>> pio.orca.config.update(timeout=30, default_format='svg'})
208 """
209 # Combine d and kwargs
210 if not isinstance(d, dict):
211 raise ValueError(
212 """
213The first argument to update must be a dict, \
214but received value of type {typ}l
215 Received value: {val}""".format(typ=type(d), val=d)
216 )
217
218 updates = copy(d)
219 updates.update(kwargs)
220
221 # Validate keys
222 for k in updates:
223 if k not in self._props:
224 raise ValueError("Invalid property name: {k}".format(k=k))
225
226 # Apply keys
227 for k, v in updates.items():
228 setattr(self, k, v)
229
230 def reload(self, warn=True):
231 """

Callers 15

get_validatorMethod · 0.45
_transform_dataMethod · 0.45
prep_xy_axisFunction · 0.45
open_axesMethod · 0.45
_orca.pyFile · 0.45
orca_envFunction · 0.45
_bulletFunction · 0.45
create_bulletFunction · 0.45
scatterplotFunction · 0.45
scatterplot_dictFunction · 0.45
scatterplot_themeFunction · 0.45

Calls 3

copyFunction · 0.50
formatMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected