Search is not available for this dataset
identifier
stringlengths 1
155
| parameters
stringlengths 2
6.09k
| docstring
stringlengths 11
63.4k
| docstring_summary
stringlengths 0
63.4k
| function
stringlengths 29
99.8k
| function_tokens
sequence | start_point
sequence | end_point
sequence | language
stringclasses 1
value | docstring_language
stringlengths 2
7
| docstring_language_predictions
stringlengths 18
23
| is_langid_reliable
stringclasses 2
values |
---|---|---|---|---|---|---|---|---|---|---|---|
MultiAgentDialogWorld.report | (self) |
Report metrics for all subagents.
|
Report metrics for all subagents.
| def report(self):
"""
Report metrics for all subagents.
"""
metrics = {}
for a in self.agents:
if hasattr(a, 'report'):
m = a.report()
for k, v in m.items():
if k not in metrics:
# first agent gets priority in settings values for keys
# this way model can't e.g. override accuracy to 100%
metrics[k] = v
if metrics and 'exs' in metrics:
self.total_exs += metrics['exs'].value()
return metrics | [
"def",
"report",
"(",
"self",
")",
":",
"metrics",
"=",
"{",
"}",
"for",
"a",
"in",
"self",
".",
"agents",
":",
"if",
"hasattr",
"(",
"a",
",",
"'report'",
")",
":",
"m",
"=",
"a",
".",
"report",
"(",
")",
"for",
"k",
",",
"v",
"in",
"m",
".",
"items",
"(",
")",
":",
"if",
"k",
"not",
"in",
"metrics",
":",
"# first agent gets priority in settings values for keys",
"# this way model can't e.g. override accuracy to 100%",
"metrics",
"[",
"k",
"]",
"=",
"v",
"if",
"metrics",
"and",
"'exs'",
"in",
"metrics",
":",
"self",
".",
"total_exs",
"+=",
"metrics",
"[",
"'exs'",
"]",
".",
"value",
"(",
")",
"return",
"metrics"
] | [
482,
4
] | [
497,
22
] | python | en | ['en', 'error', 'th'] | False |
MultiAgentDialogWorld.shutdown | (self) |
Shutdown each agent.
|
Shutdown each agent.
| def shutdown(self):
"""
Shutdown each agent.
"""
for a in self.agents:
a.shutdown() | [
"def",
"shutdown",
"(",
"self",
")",
":",
"for",
"a",
"in",
"self",
".",
"agents",
":",
"a",
".",
"shutdown",
"(",
")"
] | [
499,
4
] | [
504,
24
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.num_examples | (self) |
Return sum of each subworld's number of examples.
|
Return sum of each subworld's number of examples.
| def num_examples(self):
"""
Return sum of each subworld's number of examples.
"""
if not hasattr(self, 'num_exs'):
worlds_num_exs = [w.num_examples() for w in self.worlds]
if any(num is None for num in worlds_num_exs):
self.num_exs = None
else:
self.num_exs = sum(worlds_num_exs)
return self.num_exs | [
"def",
"num_examples",
"(",
"self",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'num_exs'",
")",
":",
"worlds_num_exs",
"=",
"[",
"w",
".",
"num_examples",
"(",
")",
"for",
"w",
"in",
"self",
".",
"worlds",
"]",
"if",
"any",
"(",
"num",
"is",
"None",
"for",
"num",
"in",
"worlds_num_exs",
")",
":",
"self",
".",
"num_exs",
"=",
"None",
"else",
":",
"self",
".",
"num_exs",
"=",
"sum",
"(",
"worlds_num_exs",
")",
"return",
"self",
".",
"num_exs"
] | [
569,
4
] | [
579,
27
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.num_episodes | (self) |
Return sum of each subworld's number of episodes.
|
Return sum of each subworld's number of episodes.
| def num_episodes(self):
"""
Return sum of each subworld's number of episodes.
"""
if not hasattr(self, 'num_eps'):
worlds_num_eps = [w.num_episodes() for w in self.worlds]
if any(num is None for num in worlds_num_eps):
self.num_eps = None
else:
self.num_eps = sum(worlds_num_eps)
return self.num_eps | [
"def",
"num_episodes",
"(",
"self",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'num_eps'",
")",
":",
"worlds_num_eps",
"=",
"[",
"w",
".",
"num_episodes",
"(",
")",
"for",
"w",
"in",
"self",
".",
"worlds",
"]",
"if",
"any",
"(",
"num",
"is",
"None",
"for",
"num",
"in",
"worlds_num_eps",
")",
":",
"self",
".",
"num_eps",
"=",
"None",
"else",
":",
"self",
".",
"num_eps",
"=",
"sum",
"(",
"worlds_num_eps",
")",
"return",
"self",
".",
"num_eps"
] | [
581,
4
] | [
591,
27
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.get_agents | (self) |
Return the agents in the *current* subworld.
|
Return the agents in the *current* subworld.
| def get_agents(self):
"""
Return the agents in the *current* subworld.
"""
return self.worlds[self.world_idx].get_agents() | [
"def",
"get_agents",
"(",
"self",
")",
":",
"return",
"self",
".",
"worlds",
"[",
"self",
".",
"world_idx",
"]",
".",
"get_agents",
"(",
")"
] | [
593,
4
] | [
597,
55
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.get_task_agent | (self) |
Not possible/well-defined in this setting.
|
Not possible/well-defined in this setting.
| def get_task_agent(self):
"""
Not possible/well-defined in this setting.
"""
return self.worlds[self.world_idx].get_task_agent() | [
"def",
"get_task_agent",
"(",
"self",
")",
":",
"return",
"self",
".",
"worlds",
"[",
"self",
".",
"world_idx",
"]",
".",
"get_task_agent",
"(",
")"
] | [
599,
4
] | [
603,
59
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.get_model_agent | (self) |
Not implemented.
|
Not implemented.
| def get_model_agent(self):
"""
Not implemented.
"""
return self.worlds[self.world_idx].get_model_agent() | [
"def",
"get_model_agent",
"(",
"self",
")",
":",
"return",
"self",
".",
"worlds",
"[",
"self",
".",
"world_idx",
"]",
".",
"get_model_agent",
"(",
")"
] | [
605,
4
] | [
609,
60
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.get_acts | (self) |
Return the acts in the *current* subworld.
|
Return the acts in the *current* subworld.
| def get_acts(self):
"""
Return the acts in the *current* subworld.
"""
return self.worlds[self.world_idx].get_acts() | [
"def",
"get_acts",
"(",
"self",
")",
":",
"return",
"self",
".",
"worlds",
"[",
"self",
".",
"world_idx",
"]",
".",
"get_acts",
"(",
")"
] | [
611,
4
] | [
615,
53
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.share | (self) |
Share all the subworlds.
|
Share all the subworlds.
| def share(self):
"""
Share all the subworlds.
"""
shared_data = {}
shared_data['world_class'] = type(self)
shared_data['opt'] = self.opt
shared_data['worlds'] = [w.share() for w in self.worlds]
return shared_data | [
"def",
"share",
"(",
"self",
")",
":",
"shared_data",
"=",
"{",
"}",
"shared_data",
"[",
"'world_class'",
"]",
"=",
"type",
"(",
"self",
")",
"shared_data",
"[",
"'opt'",
"]",
"=",
"self",
".",
"opt",
"shared_data",
"[",
"'worlds'",
"]",
"=",
"[",
"w",
".",
"share",
"(",
")",
"for",
"w",
"in",
"self",
".",
"worlds",
"]",
"return",
"shared_data"
] | [
617,
4
] | [
625,
26
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.epoch_done | (self) |
Return if *all* the subworlds are done.
|
Return if *all* the subworlds are done.
| def epoch_done(self):
"""
Return if *all* the subworlds are done.
"""
for t in self.worlds:
if not t.epoch_done():
return False
return True | [
"def",
"epoch_done",
"(",
"self",
")",
":",
"for",
"t",
"in",
"self",
".",
"worlds",
":",
"if",
"not",
"t",
".",
"epoch_done",
"(",
")",
":",
"return",
"False",
"return",
"True"
] | [
627,
4
] | [
634,
19
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.parley_init | (self) |
Update the current subworld.
If we are in the middle of an episode, keep the same world and finish this
episode. If we have finished this episode, pick a new world (either in a random
or round-robin fashion).
|
Update the current subworld. | def parley_init(self):
"""
Update the current subworld.
If we are in the middle of an episode, keep the same world and finish this
episode. If we have finished this episode, pick a new world (either in a random
or round-robin fashion).
"""
self.parleys = self.parleys + 1
if self.world_idx >= 0 and self.worlds[self.world_idx].episode_done():
self.new_world = True
if self.new_world:
self.new_world = False
self.parleys = 0
if self.is_training:
# select random world
self.world_idx = random.choices(
self.task_choices, cum_weights=self.cum_task_weights
)[0]
else:
# do at most one full loop looking for unfinished world
for _ in range(len(self.worlds)):
self.world_idx = (self.world_idx + 1) % len(self.worlds)
if not self.worlds[self.world_idx].epoch_done():
# if this world has examples ready, break
break | [
"def",
"parley_init",
"(",
"self",
")",
":",
"self",
".",
"parleys",
"=",
"self",
".",
"parleys",
"+",
"1",
"if",
"self",
".",
"world_idx",
">=",
"0",
"and",
"self",
".",
"worlds",
"[",
"self",
".",
"world_idx",
"]",
".",
"episode_done",
"(",
")",
":",
"self",
".",
"new_world",
"=",
"True",
"if",
"self",
".",
"new_world",
":",
"self",
".",
"new_world",
"=",
"False",
"self",
".",
"parleys",
"=",
"0",
"if",
"self",
".",
"is_training",
":",
"# select random world",
"self",
".",
"world_idx",
"=",
"random",
".",
"choices",
"(",
"self",
".",
"task_choices",
",",
"cum_weights",
"=",
"self",
".",
"cum_task_weights",
")",
"[",
"0",
"]",
"else",
":",
"# do at most one full loop looking for unfinished world",
"for",
"_",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"worlds",
")",
")",
":",
"self",
".",
"world_idx",
"=",
"(",
"self",
".",
"world_idx",
"+",
"1",
")",
"%",
"len",
"(",
"self",
".",
"worlds",
")",
"if",
"not",
"self",
".",
"worlds",
"[",
"self",
".",
"world_idx",
"]",
".",
"epoch_done",
"(",
")",
":",
"# if this world has examples ready, break",
"break"
] | [
636,
4
] | [
661,
29
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.parley | (self) |
Parley the *current* subworld.
|
Parley the *current* subworld.
| def parley(self):
"""
Parley the *current* subworld.
"""
self.parley_init()
self.worlds[self.world_idx].parley()
self.update_counters() | [
"def",
"parley",
"(",
"self",
")",
":",
"self",
".",
"parley_init",
"(",
")",
"self",
".",
"worlds",
"[",
"self",
".",
"world_idx",
"]",
".",
"parley",
"(",
")",
"self",
".",
"update_counters",
"(",
")"
] | [
663,
4
] | [
669,
30
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.display | (self) |
Display all subworlds.
|
Display all subworlds.
| def display(self):
"""
Display all subworlds.
"""
if self.world_idx != -1:
s = ''
w = self.worlds[self.world_idx]
if self.parleys == 0:
s = '[world ' + str(self.world_idx) + ':' + w.getID() + ']\n'
s = s + w.display()
return s
else:
return '' | [
"def",
"display",
"(",
"self",
")",
":",
"if",
"self",
".",
"world_idx",
"!=",
"-",
"1",
":",
"s",
"=",
"''",
"w",
"=",
"self",
".",
"worlds",
"[",
"self",
".",
"world_idx",
"]",
"if",
"self",
".",
"parleys",
"==",
"0",
":",
"s",
"=",
"'[world '",
"+",
"str",
"(",
"self",
".",
"world_idx",
")",
"+",
"':'",
"+",
"w",
".",
"getID",
"(",
")",
"+",
"']\\n'",
"s",
"=",
"s",
"+",
"w",
".",
"display",
"(",
")",
"return",
"s",
"else",
":",
"return",
"''"
] | [
671,
4
] | [
683,
21
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.report | (self) |
Report aggregate metrics across all subworlds.
|
Report aggregate metrics across all subworlds.
| def report(self):
"""
Report aggregate metrics across all subworlds.
"""
metrics = aggregate_named_reports(
{w.getID(): w.report() for w in self.worlds},
micro_average=self.opt.get('aggregate_micro', False),
)
if 'exs' in metrics:
self.total_exs += metrics['exs'].value()
return metrics | [
"def",
"report",
"(",
"self",
")",
":",
"metrics",
"=",
"aggregate_named_reports",
"(",
"{",
"w",
".",
"getID",
"(",
")",
":",
"w",
".",
"report",
"(",
")",
"for",
"w",
"in",
"self",
".",
"worlds",
"}",
",",
"micro_average",
"=",
"self",
".",
"opt",
".",
"get",
"(",
"'aggregate_micro'",
",",
"False",
")",
",",
")",
"if",
"'exs'",
"in",
"metrics",
":",
"self",
".",
"total_exs",
"+=",
"metrics",
"[",
"'exs'",
"]",
".",
"value",
"(",
")",
"return",
"metrics"
] | [
685,
4
] | [
695,
22
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.reset | (self) |
Reset all subworlds.
|
Reset all subworlds.
| def reset(self):
"""
Reset all subworlds.
"""
for w in self.worlds:
w.reset() | [
"def",
"reset",
"(",
"self",
")",
":",
"for",
"w",
"in",
"self",
".",
"worlds",
":",
"w",
".",
"reset",
"(",
")"
] | [
697,
4
] | [
702,
21
] | python | en | ['en', 'error', 'th'] | False |
MultiWorld.reset_metrics | (self) |
Reset metrics in all subworlds.
|
Reset metrics in all subworlds.
| def reset_metrics(self):
"""
Reset metrics in all subworlds.
"""
for w in self.worlds:
w.reset_metrics() | [
"def",
"reset_metrics",
"(",
"self",
")",
":",
"for",
"w",
"in",
"self",
".",
"worlds",
":",
"w",
".",
"reset_metrics",
"(",
")"
] | [
704,
4
] | [
709,
29
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.batch_observe | (self, index, batch_actions, index_acting) |
Observe corresponding actions in all subworlds.
|
Observe corresponding actions in all subworlds.
| def batch_observe(self, index, batch_actions, index_acting):
"""
Observe corresponding actions in all subworlds.
"""
batch_observations = []
for i, w in enumerate(self.worlds):
agents = w.get_agents()
observation = None
if batch_actions[i] is None:
# shouldn't send None, should send empty observations
batch_actions[i] = [{}] * len(self.worlds)
if hasattr(w, 'observe'):
# The world has its own observe function, which the action
# first goes through (agents receive messages via the world,
# not from each other).
observation = w.observe(agents[index], validate(batch_actions[i]))
else:
observation = validate(batch_actions[i])
if index == index_acting:
# self_observe is distinguished from a normal observe
if hasattr(agents[index], 'self_observe'):
agents[index].self_observe(observation)
else:
observation = agents[index].observe(observation)
# TODO: not so sure about this...
if observation is None:
raise ValueError('Agents should return what they observed.')
batch_observations.append(observation)
return batch_observations | [
"def",
"batch_observe",
"(",
"self",
",",
"index",
",",
"batch_actions",
",",
"index_acting",
")",
":",
"batch_observations",
"=",
"[",
"]",
"for",
"i",
",",
"w",
"in",
"enumerate",
"(",
"self",
".",
"worlds",
")",
":",
"agents",
"=",
"w",
".",
"get_agents",
"(",
")",
"observation",
"=",
"None",
"if",
"batch_actions",
"[",
"i",
"]",
"is",
"None",
":",
"# shouldn't send None, should send empty observations",
"batch_actions",
"[",
"i",
"]",
"=",
"[",
"{",
"}",
"]",
"*",
"len",
"(",
"self",
".",
"worlds",
")",
"if",
"hasattr",
"(",
"w",
",",
"'observe'",
")",
":",
"# The world has its own observe function, which the action",
"# first goes through (agents receive messages via the world,",
"# not from each other).",
"observation",
"=",
"w",
".",
"observe",
"(",
"agents",
"[",
"index",
"]",
",",
"validate",
"(",
"batch_actions",
"[",
"i",
"]",
")",
")",
"else",
":",
"observation",
"=",
"validate",
"(",
"batch_actions",
"[",
"i",
"]",
")",
"if",
"index",
"==",
"index_acting",
":",
"# self_observe is distinguished from a normal observe",
"if",
"hasattr",
"(",
"agents",
"[",
"index",
"]",
",",
"'self_observe'",
")",
":",
"agents",
"[",
"index",
"]",
".",
"self_observe",
"(",
"observation",
")",
"else",
":",
"observation",
"=",
"agents",
"[",
"index",
"]",
".",
"observe",
"(",
"observation",
")",
"# TODO: not so sure about this...",
"if",
"observation",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'Agents should return what they observed.'",
")",
"batch_observations",
".",
"append",
"(",
"observation",
")",
"return",
"batch_observations"
] | [
775,
4
] | [
806,
33
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.batch_act | (self, agent_idx, batch_observation) |
Act in all subworlds.
|
Act in all subworlds.
| def batch_act(self, agent_idx, batch_observation):
"""
Act in all subworlds.
"""
# Given batch observation, do update for agents[index].
# Call update on agent
a = self.world.get_agents()[agent_idx]
if hasattr(a, 'batch_act'):
batch_actions = a.batch_act(batch_observation)
# Store the actions locally in each world.
for i, w in enumerate(self.worlds):
acts = w.get_acts()
acts[agent_idx] = batch_actions[i]
else:
# Reverts to running on each individually.
batch_actions = []
for w in self.worlds:
agents = w.get_agents()
acts = w.get_acts()
acts[agent_idx] = agents[agent_idx].act()
batch_actions.append(acts[agent_idx])
return batch_actions | [
"def",
"batch_act",
"(",
"self",
",",
"agent_idx",
",",
"batch_observation",
")",
":",
"# Given batch observation, do update for agents[index].",
"# Call update on agent",
"a",
"=",
"self",
".",
"world",
".",
"get_agents",
"(",
")",
"[",
"agent_idx",
"]",
"if",
"hasattr",
"(",
"a",
",",
"'batch_act'",
")",
":",
"batch_actions",
"=",
"a",
".",
"batch_act",
"(",
"batch_observation",
")",
"# Store the actions locally in each world.",
"for",
"i",
",",
"w",
"in",
"enumerate",
"(",
"self",
".",
"worlds",
")",
":",
"acts",
"=",
"w",
".",
"get_acts",
"(",
")",
"acts",
"[",
"agent_idx",
"]",
"=",
"batch_actions",
"[",
"i",
"]",
"else",
":",
"# Reverts to running on each individually.",
"batch_actions",
"=",
"[",
"]",
"for",
"w",
"in",
"self",
".",
"worlds",
":",
"agents",
"=",
"w",
".",
"get_agents",
"(",
")",
"acts",
"=",
"w",
".",
"get_acts",
"(",
")",
"acts",
"[",
"agent_idx",
"]",
"=",
"agents",
"[",
"agent_idx",
"]",
".",
"act",
"(",
")",
"batch_actions",
".",
"append",
"(",
"acts",
"[",
"agent_idx",
"]",
")",
"return",
"batch_actions"
] | [
808,
4
] | [
829,
28
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.parley | (self) |
Parley in all subworlds.
Usually with ref:`batch_act` and ref:`batch_observe`.
|
Parley in all subworlds. | def parley(self):
"""
Parley in all subworlds.
Usually with ref:`batch_act` and ref:`batch_observe`.
"""
# Collect batch together for each agent, and do update.
# Assumes DialogPartnerWorld, MultiAgentWorld, or MultiWorlds of them.
num_agents = len(self.world.get_agents())
batch_observations = self.batch_observations
if hasattr(self.world, 'parley_init'):
for w in self.worlds:
w.parley_init()
for agent_idx in range(num_agents):
# The agent acts.
batch_act = self.batch_act(agent_idx, batch_observations[agent_idx])
self.acts[agent_idx] = batch_act
# We possibly execute this action in the world.
if hasattr(self.world, 'execute'):
for w in self.worlds:
w.execute(w.agents[agent_idx], batch_act[agent_idx])
# All agents (might) observe the results.
for other_index in range(num_agents):
obs = self.batch_observe(other_index, batch_act, agent_idx)
if obs is not None:
batch_observations[other_index] = obs
self.update_counters() | [
"def",
"parley",
"(",
"self",
")",
":",
"# Collect batch together for each agent, and do update.",
"# Assumes DialogPartnerWorld, MultiAgentWorld, or MultiWorlds of them.",
"num_agents",
"=",
"len",
"(",
"self",
".",
"world",
".",
"get_agents",
"(",
")",
")",
"batch_observations",
"=",
"self",
".",
"batch_observations",
"if",
"hasattr",
"(",
"self",
".",
"world",
",",
"'parley_init'",
")",
":",
"for",
"w",
"in",
"self",
".",
"worlds",
":",
"w",
".",
"parley_init",
"(",
")",
"for",
"agent_idx",
"in",
"range",
"(",
"num_agents",
")",
":",
"# The agent acts.",
"batch_act",
"=",
"self",
".",
"batch_act",
"(",
"agent_idx",
",",
"batch_observations",
"[",
"agent_idx",
"]",
")",
"self",
".",
"acts",
"[",
"agent_idx",
"]",
"=",
"batch_act",
"# We possibly execute this action in the world.",
"if",
"hasattr",
"(",
"self",
".",
"world",
",",
"'execute'",
")",
":",
"for",
"w",
"in",
"self",
".",
"worlds",
":",
"w",
".",
"execute",
"(",
"w",
".",
"agents",
"[",
"agent_idx",
"]",
",",
"batch_act",
"[",
"agent_idx",
"]",
")",
"# All agents (might) observe the results.",
"for",
"other_index",
"in",
"range",
"(",
"num_agents",
")",
":",
"obs",
"=",
"self",
".",
"batch_observe",
"(",
"other_index",
",",
"batch_act",
",",
"agent_idx",
")",
"if",
"obs",
"is",
"not",
"None",
":",
"batch_observations",
"[",
"other_index",
"]",
"=",
"obs",
"self",
".",
"update_counters",
"(",
")"
] | [
831,
4
] | [
859,
30
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.display | (self) |
Display the full batch.
|
Display the full batch.
| def display(self):
"""
Display the full batch.
"""
s = "[--batchsize " + str(len(self.worlds)) + "--]\n"
for i, w in enumerate(self.worlds):
s += "[batch world " + str(i) + ":]\n"
s += w.display() + '\n'
s += "[--end of batch--]"
return s | [
"def",
"display",
"(",
"self",
")",
":",
"s",
"=",
"\"[--batchsize \"",
"+",
"str",
"(",
"len",
"(",
"self",
".",
"worlds",
")",
")",
"+",
"\"--]\\n\"",
"for",
"i",
",",
"w",
"in",
"enumerate",
"(",
"self",
".",
"worlds",
")",
":",
"s",
"+=",
"\"[batch world \"",
"+",
"str",
"(",
"i",
")",
"+",
"\":]\\n\"",
"s",
"+=",
"w",
".",
"display",
"(",
")",
"+",
"'\\n'",
"s",
"+=",
"\"[--end of batch--]\"",
"return",
"s"
] | [
861,
4
] | [
870,
16
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.num_examples | (self) |
Return the number of examples for the root world.
|
Return the number of examples for the root world.
| def num_examples(self):
"""
Return the number of examples for the root world.
"""
return self.world.num_examples() | [
"def",
"num_examples",
"(",
"self",
")",
":",
"return",
"self",
".",
"world",
".",
"num_examples",
"(",
")"
] | [
872,
4
] | [
876,
40
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.num_episodes | (self) |
Return the number of episodes for the root world.
|
Return the number of episodes for the root world.
| def num_episodes(self):
"""
Return the number of episodes for the root world.
"""
return self.world.num_episodes() | [
"def",
"num_episodes",
"(",
"self",
")",
":",
"return",
"self",
".",
"world",
".",
"num_episodes",
"(",
")"
] | [
878,
4
] | [
882,
40
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.get_total_exs | (self) |
Return the total number of processed episodes in the root world.
|
Return the total number of processed episodes in the root world.
| def get_total_exs(self):
"""
Return the total number of processed episodes in the root world.
"""
return self.world.get_total_exs() | [
"def",
"get_total_exs",
"(",
"self",
")",
":",
"return",
"self",
".",
"world",
".",
"get_total_exs",
"(",
")"
] | [
884,
4
] | [
888,
41
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.getID | (self) |
Return the ID of the root world.
|
Return the ID of the root world.
| def getID(self):
"""
Return the ID of the root world.
"""
return self.world.getID() | [
"def",
"getID",
"(",
"self",
")",
":",
"return",
"self",
".",
"world",
".",
"getID",
"(",
")"
] | [
890,
4
] | [
894,
33
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.get_agents | (self) |
Return the agents of the root world.
|
Return the agents of the root world.
| def get_agents(self):
"""
Return the agents of the root world.
"""
return self.world.get_agents() | [
"def",
"get_agents",
"(",
"self",
")",
":",
"return",
"self",
".",
"world",
".",
"get_agents",
"(",
")"
] | [
896,
4
] | [
900,
38
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.get_task_agent | (self) |
Return task agent of the root world.
|
Return task agent of the root world.
| def get_task_agent(self):
"""
Return task agent of the root world.
"""
return self.world.get_task_agent() | [
"def",
"get_task_agent",
"(",
"self",
")",
":",
"return",
"self",
".",
"world",
".",
"get_task_agent",
"(",
")"
] | [
902,
4
] | [
906,
42
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.get_model_agent | (self) |
Return model agent of the root world.
|
Return model agent of the root world.
| def get_model_agent(self):
"""
Return model agent of the root world.
"""
return self.world.get_model_agent() | [
"def",
"get_model_agent",
"(",
"self",
")",
":",
"return",
"self",
".",
"world",
".",
"get_model_agent",
"(",
")"
] | [
908,
4
] | [
912,
43
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.episode_done | (self) |
Return whether the episode is done.
A batch world is never finished, so this always returns `False`.
|
Return whether the episode is done. | def episode_done(self):
"""
Return whether the episode is done.
A batch world is never finished, so this always returns `False`.
"""
return False | [
"def",
"episode_done",
"(",
"self",
")",
":",
"return",
"False"
] | [
914,
4
] | [
920,
20
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.epoch_done | (self) |
Return if the epoch is done in the root world.
|
Return if the epoch is done in the root world.
| def epoch_done(self):
"""
Return if the epoch is done in the root world.
"""
# first check parent world: if it says it's done, we're done
if self.world.epoch_done():
return True
# otherwise check if all shared worlds are done
for world in self.worlds:
if not world.epoch_done():
return False
return True | [
"def",
"epoch_done",
"(",
"self",
")",
":",
"# first check parent world: if it says it's done, we're done",
"if",
"self",
".",
"world",
".",
"epoch_done",
"(",
")",
":",
"return",
"True",
"# otherwise check if all shared worlds are done",
"for",
"world",
"in",
"self",
".",
"worlds",
":",
"if",
"not",
"world",
".",
"epoch_done",
"(",
")",
":",
"return",
"False",
"return",
"True"
] | [
922,
4
] | [
933,
19
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.report | (self) |
Report metrics for the root world.
|
Report metrics for the root world.
| def report(self):
"""
Report metrics for the root world.
"""
return self.world.report() | [
"def",
"report",
"(",
"self",
")",
":",
"return",
"self",
".",
"world",
".",
"report",
"(",
")"
] | [
935,
4
] | [
939,
34
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.reset | (self) |
Reset the root world, and all copies.
|
Reset the root world, and all copies.
| def reset(self):
"""
Reset the root world, and all copies.
"""
self.world.reset()
for w in self.worlds:
w.reset() | [
"def",
"reset",
"(",
"self",
")",
":",
"self",
".",
"world",
".",
"reset",
"(",
")",
"for",
"w",
"in",
"self",
".",
"worlds",
":",
"w",
".",
"reset",
"(",
")"
] | [
941,
4
] | [
947,
21
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.reset_metrics | (self) |
Reset metrics in the root world.
|
Reset metrics in the root world.
| def reset_metrics(self):
"""
Reset metrics in the root world.
"""
self.world.reset_metrics() | [
"def",
"reset_metrics",
"(",
"self",
")",
":",
"self",
".",
"world",
".",
"reset_metrics",
"(",
")"
] | [
949,
4
] | [
953,
34
] | python | en | ['en', 'error', 'th'] | False |
BatchWorld.shutdown | (self) |
Shutdown each world.
|
Shutdown each world.
| def shutdown(self):
"""
Shutdown each world.
"""
for w in self.worlds:
w.shutdown()
self.world.shutdown() | [
"def",
"shutdown",
"(",
"self",
")",
":",
"for",
"w",
"in",
"self",
".",
"worlds",
":",
"w",
".",
"shutdown",
"(",
")",
"self",
".",
"world",
".",
"shutdown",
"(",
")"
] | [
955,
4
] | [
961,
29
] | python | en | ['en', 'error', 'th'] | False |
DynamicBatchWorld._ceil | (self, n) |
Round to the nearest multiple of 8.
TensorCores only work when a tensor is a multiple of 8 in almost all
dimensions. This means all examples cost is related to their nearest
multiple of 8.
See https://devblogs.nvidia.com/programming-tensor-cores-cuda-9/ for
more information.
|
Round to the nearest multiple of 8. | def _ceil(self, n):
"""
Round to the nearest multiple of 8.
TensorCores only work when a tensor is a multiple of 8 in almost all
dimensions. This means all examples cost is related to their nearest
multiple of 8.
See https://devblogs.nvidia.com/programming-tensor-cores-cuda-9/ for
more information.
"""
# round up to r, all things are equal
from parlai.utils.torch import FP16_PAD_SIZE
return ((n + FP16_PAD_SIZE - 1) // FP16_PAD_SIZE) * FP16_PAD_SIZE | [
"def",
"_ceil",
"(",
"self",
",",
"n",
")",
":",
"# round up to r, all things are equal",
"from",
"parlai",
".",
"utils",
".",
"torch",
"import",
"FP16_PAD_SIZE",
"return",
"(",
"(",
"n",
"+",
"FP16_PAD_SIZE",
"-",
"1",
")",
"//",
"FP16_PAD_SIZE",
")",
"*",
"FP16_PAD_SIZE"
] | [
1048,
4
] | [
1062,
73
] | python | en | ['en', 'error', 'th'] | False |
escape_string | (s) | Logic taken from the official rcon client.
There's probably plenty of nicer and more bulletproof ones
| Logic taken from the official rcon client.
There's probably plenty of nicer and more bulletproof ones
| def escape_string(s):
"""Logic taken from the official rcon client.
There's probably plenty of nicer and more bulletproof ones
"""
if not isinstance(s, str):
return s
st = ""
for index in range(len(s)):
st = (
(st + s[index] if s[index] != "\\" else st + "\\\\")
if s[index] != '"'
else st + '\\"'
)
return st | [
"def",
"escape_string",
"(",
"s",
")",
":",
"if",
"not",
"isinstance",
"(",
"s",
",",
"str",
")",
":",
"return",
"s",
"st",
"=",
"\"\"",
"for",
"index",
"in",
"range",
"(",
"len",
"(",
"s",
")",
")",
":",
"st",
"=",
"(",
"(",
"st",
"+",
"s",
"[",
"index",
"]",
"if",
"s",
"[",
"index",
"]",
"!=",
"\"\\\\\"",
"else",
"st",
"+",
"\"\\\\\\\\\"",
")",
"if",
"s",
"[",
"index",
"]",
"!=",
"'\"'",
"else",
"st",
"+",
"'\\\\\"'",
")",
"return",
"st"
] | [
14,
0
] | [
27,
13
] | python | en | ['en', 'en', 'en'] | True |
ServerCtl.set_autobalance_enabled | (self, bool_str) |
String bool is on / off
|
String bool is on / off
| def set_autobalance_enabled(self, bool_str):
"""
String bool is on / off
"""
return self._request(f"setautobalanceenabled {bool_str}") | [
"def",
"set_autobalance_enabled",
"(",
"self",
",",
"bool_str",
")",
":",
"return",
"self",
".",
"_request",
"(",
"f\"setautobalanceenabled {bool_str}\"",
")"
] | [
299,
4
] | [
303,
65
] | python | en | ['en', 'error', 'th'] | False |
ServerCtl.set_votekick_enabled | (self, bool_str) |
String bool is on / off
|
String bool is on / off
| def set_votekick_enabled(self, bool_str):
"""
String bool is on / off
"""
return self._request(f"setvotekickenabled {bool_str}") | [
"def",
"set_votekick_enabled",
"(",
"self",
",",
"bool_str",
")",
":",
"return",
"self",
".",
"_request",
"(",
"f\"setvotekickenabled {bool_str}\"",
")"
] | [
333,
4
] | [
337,
62
] | python | en | ['en', 'error', 'th'] | False |
ServerCtl.set_votekick_threshold | (self, threshold_pairs_str) |
PlayerCount,Threshold[,PlayerCount,Threshold,...]
|
PlayerCount,Threshold[,PlayerCount,Threshold,...]
| def set_votekick_threshold(self, threshold_pairs_str):
"""
PlayerCount,Threshold[,PlayerCount,Threshold,...]
"""
return self._request(f"setvotekickthreshold {threshold_pairs_str}") | [
"def",
"set_votekick_threshold",
"(",
"self",
",",
"threshold_pairs_str",
")",
":",
"return",
"self",
".",
"_request",
"(",
"f\"setvotekickthreshold {threshold_pairs_str}\"",
")"
] | [
339,
4
] | [
343,
75
] | python | en | ['en', 'error', 'th'] | False |
PresentationHandler.handle | (self, context: RequestContext, responder: BaseResponder) |
Message handler logic for presentations.
Args:
context: request context
responder: responder callback
|
Message handler logic for presentations. | async def handle(self, context: RequestContext, responder: BaseResponder):
"""
Message handler logic for presentations.
Args:
context: request context
responder: responder callback
"""
self._logger.debug("PresentationHandler called with context %s", context)
assert isinstance(context.message, Presentation)
self._logger.info(
"Received presentation message: %s",
context.message.serialize(as_string=True),
)
if not context.connection_ready:
raise HandlerException("No connection established for presentation request")
presentation_manager = PresentationManager(context)
presentation_exchange_record = await presentation_manager.receive_presentation()
if context.settings.get("debug.auto_verify_presentation"):
await presentation_manager.verify_presentation(presentation_exchange_record) | [
"async",
"def",
"handle",
"(",
"self",
",",
"context",
":",
"RequestContext",
",",
"responder",
":",
"BaseResponder",
")",
":",
"self",
".",
"_logger",
".",
"debug",
"(",
"\"PresentationHandler called with context %s\"",
",",
"context",
")",
"assert",
"isinstance",
"(",
"context",
".",
"message",
",",
"Presentation",
")",
"self",
".",
"_logger",
".",
"info",
"(",
"\"Received presentation message: %s\"",
",",
"context",
".",
"message",
".",
"serialize",
"(",
"as_string",
"=",
"True",
")",
",",
")",
"if",
"not",
"context",
".",
"connection_ready",
":",
"raise",
"HandlerException",
"(",
"\"No connection established for presentation request\"",
")",
"presentation_manager",
"=",
"PresentationManager",
"(",
"context",
")",
"presentation_exchange_record",
"=",
"await",
"presentation_manager",
".",
"receive_presentation",
"(",
")",
"if",
"context",
".",
"settings",
".",
"get",
"(",
"\"debug.auto_verify_presentation\"",
")",
":",
"await",
"presentation_manager",
".",
"verify_presentation",
"(",
"presentation_exchange_record",
")"
] | [
16,
4
] | [
40,
88
] | python | en | ['en', 'error', 'th'] | False |
bbox3d_mapping_back | (bboxes, scale_factor, flip_horizontal, flip_vertical) | Map bboxes from testing scale to original image scale.
Args:
bboxes (:obj:`BaseInstance3DBoxes`): Boxes to be mapped back.
scale_factor (float): Scale factor.
flip_horizontal (bool): Whether to flip horizontally.
flip_vertical (bool): Whether to flip vertically.
Returns:
:obj:`BaseInstance3DBoxes`: Boxes mapped back.
| Map bboxes from testing scale to original image scale. | def bbox3d_mapping_back(bboxes, scale_factor, flip_horizontal, flip_vertical):
"""Map bboxes from testing scale to original image scale.
Args:
bboxes (:obj:`BaseInstance3DBoxes`): Boxes to be mapped back.
scale_factor (float): Scale factor.
flip_horizontal (bool): Whether to flip horizontally.
flip_vertical (bool): Whether to flip vertically.
Returns:
:obj:`BaseInstance3DBoxes`: Boxes mapped back.
"""
new_bboxes = bboxes.clone()
if flip_horizontal:
new_bboxes.flip('horizontal')
if flip_vertical:
new_bboxes.flip('vertical')
new_bboxes.scale(1 / scale_factor)
return new_bboxes | [
"def",
"bbox3d_mapping_back",
"(",
"bboxes",
",",
"scale_factor",
",",
"flip_horizontal",
",",
"flip_vertical",
")",
":",
"new_bboxes",
"=",
"bboxes",
".",
"clone",
"(",
")",
"if",
"flip_horizontal",
":",
"new_bboxes",
".",
"flip",
"(",
"'horizontal'",
")",
"if",
"flip_vertical",
":",
"new_bboxes",
".",
"flip",
"(",
"'vertical'",
")",
"new_bboxes",
".",
"scale",
"(",
"1",
"/",
"scale_factor",
")",
"return",
"new_bboxes"
] | [
3,
0
] | [
22,
21
] | python | en | ['en', 'en', 'en'] | True |
bbox3d2roi | (bbox_list) | Convert a list of bounding boxes to roi format.
Args:
bbox_list (list[torch.Tensor]): A list of bounding boxes
corresponding to a batch of images.
Returns:
torch.Tensor: Region of interests in shape (n, c), where \
the channels are in order of [batch_ind, x, y ...].
| Convert a list of bounding boxes to roi format. | def bbox3d2roi(bbox_list):
"""Convert a list of bounding boxes to roi format.
Args:
bbox_list (list[torch.Tensor]): A list of bounding boxes
corresponding to a batch of images.
Returns:
torch.Tensor: Region of interests in shape (n, c), where \
the channels are in order of [batch_ind, x, y ...].
"""
rois_list = []
for img_id, bboxes in enumerate(bbox_list):
if bboxes.size(0) > 0:
img_inds = bboxes.new_full((bboxes.size(0), 1), img_id)
rois = torch.cat([img_inds, bboxes], dim=-1)
else:
rois = torch.zeros_like(bboxes)
rois_list.append(rois)
rois = torch.cat(rois_list, 0)
return rois | [
"def",
"bbox3d2roi",
"(",
"bbox_list",
")",
":",
"rois_list",
"=",
"[",
"]",
"for",
"img_id",
",",
"bboxes",
"in",
"enumerate",
"(",
"bbox_list",
")",
":",
"if",
"bboxes",
".",
"size",
"(",
"0",
")",
">",
"0",
":",
"img_inds",
"=",
"bboxes",
".",
"new_full",
"(",
"(",
"bboxes",
".",
"size",
"(",
"0",
")",
",",
"1",
")",
",",
"img_id",
")",
"rois",
"=",
"torch",
".",
"cat",
"(",
"[",
"img_inds",
",",
"bboxes",
"]",
",",
"dim",
"=",
"-",
"1",
")",
"else",
":",
"rois",
"=",
"torch",
".",
"zeros_like",
"(",
"bboxes",
")",
"rois_list",
".",
"append",
"(",
"rois",
")",
"rois",
"=",
"torch",
".",
"cat",
"(",
"rois_list",
",",
"0",
")",
"return",
"rois"
] | [
25,
0
] | [
45,
15
] | python | en | ['en', 'en', 'en'] | True |
bbox3d2result | (bboxes, scores, labels) | Convert detection results to a list of numpy arrays.
Args:
bboxes (torch.Tensor): Bounding boxes with shape of (n, 5).
labels (torch.Tensor): Labels with shape of (n, ).
scores (torch.Tensor): Scores with shape of (n, ).
Returns:
dict[str, torch.Tensor]: Bounding box results in cpu mode.
- boxes_3d (torch.Tensor): 3D boxes.
- scores (torch.Tensor): Prediction scores.
- labels_3d (torch.Tensor): Box labels.
| Convert detection results to a list of numpy arrays. | def bbox3d2result(bboxes, scores, labels):
"""Convert detection results to a list of numpy arrays.
Args:
bboxes (torch.Tensor): Bounding boxes with shape of (n, 5).
labels (torch.Tensor): Labels with shape of (n, ).
scores (torch.Tensor): Scores with shape of (n, ).
Returns:
dict[str, torch.Tensor]: Bounding box results in cpu mode.
- boxes_3d (torch.Tensor): 3D boxes.
- scores (torch.Tensor): Prediction scores.
- labels_3d (torch.Tensor): Box labels.
"""
return dict(
boxes_3d=bboxes.to('cpu'),
scores_3d=scores.cpu(),
labels_3d=labels.cpu()) | [
"def",
"bbox3d2result",
"(",
"bboxes",
",",
"scores",
",",
"labels",
")",
":",
"return",
"dict",
"(",
"boxes_3d",
"=",
"bboxes",
".",
"to",
"(",
"'cpu'",
")",
",",
"scores_3d",
"=",
"scores",
".",
"cpu",
"(",
")",
",",
"labels_3d",
"=",
"labels",
".",
"cpu",
"(",
")",
")"
] | [
48,
0
] | [
66,
31
] | python | en | ['en', 'en', 'en'] | True |
Bar.alignmentgroup | (self) |
Set several traces linked to the same position axis or matching
axes to the same alignmentgroup. This controls whether bars
compute their positional range dependently or independently.
The 'alignmentgroup' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
|
Set several traces linked to the same position axis or matching
axes to the same alignmentgroup. This controls whether bars
compute their positional range dependently or independently.
The 'alignmentgroup' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def alignmentgroup(self):
"""
Set several traces linked to the same position axis or matching
axes to the same alignmentgroup. This controls whether bars
compute their positional range dependently or independently.
The 'alignmentgroup' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"""
return self["alignmentgroup"] | [
"def",
"alignmentgroup",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"alignmentgroup\"",
"]"
] | [
82,
4
] | [
96,
37
] | python | en | ['en', 'error', 'th'] | False |
Bar.base | (self) |
Sets where the bar base is drawn (in position axis units). In
"stack" or "relative" barmode, traces that set "base" will be
excluded and drawn in "overlay" mode instead.
The 'base' property accepts values of any type
Returns
-------
Any|numpy.ndarray
|
Sets where the bar base is drawn (in position axis units). In
"stack" or "relative" barmode, traces that set "base" will be
excluded and drawn in "overlay" mode instead.
The 'base' property accepts values of any type | def base(self):
"""
Sets where the bar base is drawn (in position axis units). In
"stack" or "relative" barmode, traces that set "base" will be
excluded and drawn in "overlay" mode instead.
The 'base' property accepts values of any type
Returns
-------
Any|numpy.ndarray
"""
return self["base"] | [
"def",
"base",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"base\"",
"]"
] | [
105,
4
] | [
117,
27
] | python | en | ['en', 'error', 'th'] | False |
Bar.basesrc | (self) |
Sets the source reference on Chart Studio Cloud for base .
The 'basesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for base .
The 'basesrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def basesrc(self):
"""
Sets the source reference on Chart Studio Cloud for base .
The 'basesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["basesrc"] | [
"def",
"basesrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"basesrc\"",
"]"
] | [
126,
4
] | [
137,
30
] | python | en | ['en', 'error', 'th'] | False |
Bar.cliponaxis | (self) |
Determines whether the text nodes are clipped about the subplot
axes. To show the text nodes above axis lines and tick labels,
make sure to set `xaxis.layer` and `yaxis.layer` to *below
traces*.
The 'cliponaxis' property must be specified as a bool
(either True, or False)
Returns
-------
bool
|
Determines whether the text nodes are clipped about the subplot
axes. To show the text nodes above axis lines and tick labels,
make sure to set `xaxis.layer` and `yaxis.layer` to *below
traces*.
The 'cliponaxis' property must be specified as a bool
(either True, or False) | def cliponaxis(self):
"""
Determines whether the text nodes are clipped about the subplot
axes. To show the text nodes above axis lines and tick labels,
make sure to set `xaxis.layer` and `yaxis.layer` to *below
traces*.
The 'cliponaxis' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
return self["cliponaxis"] | [
"def",
"cliponaxis",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cliponaxis\"",
"]"
] | [
146,
4
] | [
160,
33
] | python | en | ['en', 'error', 'th'] | False |
Bar.constraintext | (self) |
Constrain the size of text inside or outside a bar to be no
larger than the bar itself.
The 'constraintext' property is an enumeration that may be specified as:
- One of the following enumeration values:
['inside', 'outside', 'both', 'none']
Returns
-------
Any
|
Constrain the size of text inside or outside a bar to be no
larger than the bar itself.
The 'constraintext' property is an enumeration that may be specified as:
- One of the following enumeration values:
['inside', 'outside', 'both', 'none'] | def constraintext(self):
"""
Constrain the size of text inside or outside a bar to be no
larger than the bar itself.
The 'constraintext' property is an enumeration that may be specified as:
- One of the following enumeration values:
['inside', 'outside', 'both', 'none']
Returns
-------
Any
"""
return self["constraintext"] | [
"def",
"constraintext",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"constraintext\"",
"]"
] | [
169,
4
] | [
182,
36
] | python | en | ['en', 'error', 'th'] | False |
Bar.customdata | (self) |
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
The 'customdata' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
|
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
The 'customdata' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def customdata(self):
"""
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
The 'customdata' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["customdata"] | [
"def",
"customdata",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"customdata\"",
"]"
] | [
191,
4
] | [
205,
33
] | python | en | ['en', 'error', 'th'] | False |
Bar.customdatasrc | (self) |
Sets the source reference on Chart Studio Cloud for customdata
.
The 'customdatasrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for customdata
.
The 'customdatasrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def customdatasrc(self):
"""
Sets the source reference on Chart Studio Cloud for customdata
.
The 'customdatasrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["customdatasrc"] | [
"def",
"customdatasrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"customdatasrc\"",
"]"
] | [
214,
4
] | [
226,
36
] | python | en | ['en', 'error', 'th'] | False |
Bar.dx | (self) |
Sets the x coordinate step. See `x0` for more info.
The 'dx' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
|
Sets the x coordinate step. See `x0` for more info.
The 'dx' property is a number and may be specified as:
- An int or float | def dx(self):
"""
Sets the x coordinate step. See `x0` for more info.
The 'dx' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
"""
return self["dx"] | [
"def",
"dx",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"dx\"",
"]"
] | [
235,
4
] | [
246,
25
] | python | en | ['en', 'error', 'th'] | False |
Bar.dy | (self) |
Sets the y coordinate step. See `y0` for more info.
The 'dy' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
|
Sets the y coordinate step. See `y0` for more info.
The 'dy' property is a number and may be specified as:
- An int or float | def dy(self):
"""
Sets the y coordinate step. See `y0` for more info.
The 'dy' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
"""
return self["dy"] | [
"def",
"dy",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"dy\"",
"]"
] | [
255,
4
] | [
266,
25
] | python | en | ['en', 'error', 'th'] | False |
Bar.error_x | (self) |
The 'error_x' property is an instance of ErrorX
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.ErrorX`
- A dict of string/value properties that will be passed
to the ErrorX constructor
Supported dict properties:
array
Sets the data corresponding the length of each
error bar. Values are plotted relative to the
underlying data.
arrayminus
Sets the data corresponding the length of each
error bar in the bottom (left) direction for
vertical (horizontal) bars Values are plotted
relative to the underlying data.
arrayminussrc
Sets the source reference on Chart Studio Cloud
for arrayminus .
arraysrc
Sets the source reference on Chart Studio Cloud
for array .
color
Sets the stoke color of the error bars.
copy_ystyle
symmetric
Determines whether or not the error bars have
the same length in both direction (top/bottom
for vertical bars, left/right for horizontal
bars.
thickness
Sets the thickness (in px) of the error bars.
traceref
tracerefminus
type
Determines the rule used to generate the error
bars. If *constant`, the bar lengths are of a
constant value. Set this constant in `value`.
If "percent", the bar lengths correspond to a
percentage of underlying data. Set this
percentage in `value`. If "sqrt", the bar
lengths correspond to the sqaure of the
underlying data. If "data", the bar lengths are
set with data set `array`.
value
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars.
valueminus
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars in the bottom
(left) direction for vertical (horizontal) bars
visible
Determines whether or not this set of error
bars is visible.
width
Sets the width (in px) of the cross-bar at both
ends of the error bars.
Returns
-------
plotly.graph_objs.bar.ErrorX
|
The 'error_x' property is an instance of ErrorX
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.ErrorX`
- A dict of string/value properties that will be passed
to the ErrorX constructor
Supported dict properties:
array
Sets the data corresponding the length of each
error bar. Values are plotted relative to the
underlying data.
arrayminus
Sets the data corresponding the length of each
error bar in the bottom (left) direction for
vertical (horizontal) bars Values are plotted
relative to the underlying data.
arrayminussrc
Sets the source reference on Chart Studio Cloud
for arrayminus .
arraysrc
Sets the source reference on Chart Studio Cloud
for array .
color
Sets the stoke color of the error bars.
copy_ystyle
symmetric
Determines whether or not the error bars have
the same length in both direction (top/bottom
for vertical bars, left/right for horizontal
bars.
thickness
Sets the thickness (in px) of the error bars.
traceref
tracerefminus
type
Determines the rule used to generate the error
bars. If *constant`, the bar lengths are of a
constant value. Set this constant in `value`.
If "percent", the bar lengths correspond to a
percentage of underlying data. Set this
percentage in `value`. If "sqrt", the bar
lengths correspond to the sqaure of the
underlying data. If "data", the bar lengths are
set with data set `array`.
value
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars.
valueminus
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars in the bottom
(left) direction for vertical (horizontal) bars
visible
Determines whether or not this set of error
bars is visible.
width
Sets the width (in px) of the cross-bar at both
ends of the error bars. | def error_x(self):
"""
The 'error_x' property is an instance of ErrorX
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.ErrorX`
- A dict of string/value properties that will be passed
to the ErrorX constructor
Supported dict properties:
array
Sets the data corresponding the length of each
error bar. Values are plotted relative to the
underlying data.
arrayminus
Sets the data corresponding the length of each
error bar in the bottom (left) direction for
vertical (horizontal) bars Values are plotted
relative to the underlying data.
arrayminussrc
Sets the source reference on Chart Studio Cloud
for arrayminus .
arraysrc
Sets the source reference on Chart Studio Cloud
for array .
color
Sets the stoke color of the error bars.
copy_ystyle
symmetric
Determines whether or not the error bars have
the same length in both direction (top/bottom
for vertical bars, left/right for horizontal
bars.
thickness
Sets the thickness (in px) of the error bars.
traceref
tracerefminus
type
Determines the rule used to generate the error
bars. If *constant`, the bar lengths are of a
constant value. Set this constant in `value`.
If "percent", the bar lengths correspond to a
percentage of underlying data. Set this
percentage in `value`. If "sqrt", the bar
lengths correspond to the sqaure of the
underlying data. If "data", the bar lengths are
set with data set `array`.
value
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars.
valueminus
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars in the bottom
(left) direction for vertical (horizontal) bars
visible
Determines whether or not this set of error
bars is visible.
width
Sets the width (in px) of the cross-bar at both
ends of the error bars.
Returns
-------
plotly.graph_objs.bar.ErrorX
"""
return self["error_x"] | [
"def",
"error_x",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"error_x\"",
"]"
] | [
275,
4
] | [
347,
30
] | python | en | ['en', 'error', 'th'] | False |
Bar.error_y | (self) |
The 'error_y' property is an instance of ErrorY
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.ErrorY`
- A dict of string/value properties that will be passed
to the ErrorY constructor
Supported dict properties:
array
Sets the data corresponding the length of each
error bar. Values are plotted relative to the
underlying data.
arrayminus
Sets the data corresponding the length of each
error bar in the bottom (left) direction for
vertical (horizontal) bars Values are plotted
relative to the underlying data.
arrayminussrc
Sets the source reference on Chart Studio Cloud
for arrayminus .
arraysrc
Sets the source reference on Chart Studio Cloud
for array .
color
Sets the stoke color of the error bars.
symmetric
Determines whether or not the error bars have
the same length in both direction (top/bottom
for vertical bars, left/right for horizontal
bars.
thickness
Sets the thickness (in px) of the error bars.
traceref
tracerefminus
type
Determines the rule used to generate the error
bars. If *constant`, the bar lengths are of a
constant value. Set this constant in `value`.
If "percent", the bar lengths correspond to a
percentage of underlying data. Set this
percentage in `value`. If "sqrt", the bar
lengths correspond to the sqaure of the
underlying data. If "data", the bar lengths are
set with data set `array`.
value
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars.
valueminus
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars in the bottom
(left) direction for vertical (horizontal) bars
visible
Determines whether or not this set of error
bars is visible.
width
Sets the width (in px) of the cross-bar at both
ends of the error bars.
Returns
-------
plotly.graph_objs.bar.ErrorY
|
The 'error_y' property is an instance of ErrorY
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.ErrorY`
- A dict of string/value properties that will be passed
to the ErrorY constructor
Supported dict properties:
array
Sets the data corresponding the length of each
error bar. Values are plotted relative to the
underlying data.
arrayminus
Sets the data corresponding the length of each
error bar in the bottom (left) direction for
vertical (horizontal) bars Values are plotted
relative to the underlying data.
arrayminussrc
Sets the source reference on Chart Studio Cloud
for arrayminus .
arraysrc
Sets the source reference on Chart Studio Cloud
for array .
color
Sets the stoke color of the error bars.
symmetric
Determines whether or not the error bars have
the same length in both direction (top/bottom
for vertical bars, left/right for horizontal
bars.
thickness
Sets the thickness (in px) of the error bars.
traceref
tracerefminus
type
Determines the rule used to generate the error
bars. If *constant`, the bar lengths are of a
constant value. Set this constant in `value`.
If "percent", the bar lengths correspond to a
percentage of underlying data. Set this
percentage in `value`. If "sqrt", the bar
lengths correspond to the sqaure of the
underlying data. If "data", the bar lengths are
set with data set `array`.
value
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars.
valueminus
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars in the bottom
(left) direction for vertical (horizontal) bars
visible
Determines whether or not this set of error
bars is visible.
width
Sets the width (in px) of the cross-bar at both
ends of the error bars. | def error_y(self):
"""
The 'error_y' property is an instance of ErrorY
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.ErrorY`
- A dict of string/value properties that will be passed
to the ErrorY constructor
Supported dict properties:
array
Sets the data corresponding the length of each
error bar. Values are plotted relative to the
underlying data.
arrayminus
Sets the data corresponding the length of each
error bar in the bottom (left) direction for
vertical (horizontal) bars Values are plotted
relative to the underlying data.
arrayminussrc
Sets the source reference on Chart Studio Cloud
for arrayminus .
arraysrc
Sets the source reference on Chart Studio Cloud
for array .
color
Sets the stoke color of the error bars.
symmetric
Determines whether or not the error bars have
the same length in both direction (top/bottom
for vertical bars, left/right for horizontal
bars.
thickness
Sets the thickness (in px) of the error bars.
traceref
tracerefminus
type
Determines the rule used to generate the error
bars. If *constant`, the bar lengths are of a
constant value. Set this constant in `value`.
If "percent", the bar lengths correspond to a
percentage of underlying data. Set this
percentage in `value`. If "sqrt", the bar
lengths correspond to the sqaure of the
underlying data. If "data", the bar lengths are
set with data set `array`.
value
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars.
valueminus
Sets the value of either the percentage (if
`type` is set to "percent") or the constant (if
`type` is set to "constant") corresponding to
the lengths of the error bars in the bottom
(left) direction for vertical (horizontal) bars
visible
Determines whether or not this set of error
bars is visible.
width
Sets the width (in px) of the cross-bar at both
ends of the error bars.
Returns
-------
plotly.graph_objs.bar.ErrorY
"""
return self["error_y"] | [
"def",
"error_y",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"error_y\"",
"]"
] | [
356,
4
] | [
426,
30
] | python | en | ['en', 'error', 'th'] | False |
Bar.hoverinfo | (self) |
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.
The 'hoverinfo' property is a flaglist and may be specified
as a string containing:
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
(e.g. 'x+y')
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- A list or array of the above
Returns
-------
Any|numpy.ndarray
|
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.
The 'hoverinfo' property is a flaglist and may be specified
as a string containing:
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
(e.g. 'x+y')
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- A list or array of the above | def hoverinfo(self):
"""
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.
The 'hoverinfo' property is a flaglist and may be specified
as a string containing:
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
(e.g. 'x+y')
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- A list or array of the above
Returns
-------
Any|numpy.ndarray
"""
return self["hoverinfo"] | [
"def",
"hoverinfo",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hoverinfo\"",
"]"
] | [
435,
4
] | [
452,
32
] | python | en | ['en', 'error', 'th'] | False |
Bar.hoverinfosrc | (self) |
Sets the source reference on Chart Studio Cloud for hoverinfo
.
The 'hoverinfosrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for hoverinfo
.
The 'hoverinfosrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def hoverinfosrc(self):
"""
Sets the source reference on Chart Studio Cloud for hoverinfo
.
The 'hoverinfosrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["hoverinfosrc"] | [
"def",
"hoverinfosrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hoverinfosrc\"",
"]"
] | [
461,
4
] | [
473,
35
] | python | en | ['en', 'error', 'th'] | False |
Bar.hoverlabel | (self) |
The 'hoverlabel' property is an instance of Hoverlabel
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Hoverlabel`
- A dict of string/value properties that will be passed
to the Hoverlabel constructor
Supported dict properties:
align
Sets the horizontal alignment of the text
content within hover label box. Has an effect
only if the hover label text spans more two or
more lines
alignsrc
Sets the source reference on Chart Studio Cloud
for align .
bgcolor
Sets the background color of the hover labels
for this trace
bgcolorsrc
Sets the source reference on Chart Studio Cloud
for bgcolor .
bordercolor
Sets the border color of the hover labels for
this trace.
bordercolorsrc
Sets the source reference on Chart Studio Cloud
for bordercolor .
font
Sets the font used in hover labels.
namelength
Sets the default length (in number of
characters) of the trace name in the hover
labels for all traces. -1 shows the whole name
regardless of length. 0-3 shows the first 0-3
characters, and an integer >3 will show the
whole name if it is less than that many
characters, but if it is longer, will truncate
to `namelength - 3` characters and add an
ellipsis.
namelengthsrc
Sets the source reference on Chart Studio Cloud
for namelength .
Returns
-------
plotly.graph_objs.bar.Hoverlabel
|
The 'hoverlabel' property is an instance of Hoverlabel
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Hoverlabel`
- A dict of string/value properties that will be passed
to the Hoverlabel constructor
Supported dict properties:
align
Sets the horizontal alignment of the text
content within hover label box. Has an effect
only if the hover label text spans more two or
more lines
alignsrc
Sets the source reference on Chart Studio Cloud
for align .
bgcolor
Sets the background color of the hover labels
for this trace
bgcolorsrc
Sets the source reference on Chart Studio Cloud
for bgcolor .
bordercolor
Sets the border color of the hover labels for
this trace.
bordercolorsrc
Sets the source reference on Chart Studio Cloud
for bordercolor .
font
Sets the font used in hover labels.
namelength
Sets the default length (in number of
characters) of the trace name in the hover
labels for all traces. -1 shows the whole name
regardless of length. 0-3 shows the first 0-3
characters, and an integer >3 will show the
whole name if it is less than that many
characters, but if it is longer, will truncate
to `namelength - 3` characters and add an
ellipsis.
namelengthsrc
Sets the source reference on Chart Studio Cloud
for namelength . | def hoverlabel(self):
"""
The 'hoverlabel' property is an instance of Hoverlabel
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Hoverlabel`
- A dict of string/value properties that will be passed
to the Hoverlabel constructor
Supported dict properties:
align
Sets the horizontal alignment of the text
content within hover label box. Has an effect
only if the hover label text spans more two or
more lines
alignsrc
Sets the source reference on Chart Studio Cloud
for align .
bgcolor
Sets the background color of the hover labels
for this trace
bgcolorsrc
Sets the source reference on Chart Studio Cloud
for bgcolor .
bordercolor
Sets the border color of the hover labels for
this trace.
bordercolorsrc
Sets the source reference on Chart Studio Cloud
for bordercolor .
font
Sets the font used in hover labels.
namelength
Sets the default length (in number of
characters) of the trace name in the hover
labels for all traces. -1 shows the whole name
regardless of length. 0-3 shows the first 0-3
characters, and an integer >3 will show the
whole name if it is less than that many
characters, but if it is longer, will truncate
to `namelength - 3` characters and add an
ellipsis.
namelengthsrc
Sets the source reference on Chart Studio Cloud
for namelength .
Returns
-------
plotly.graph_objs.bar.Hoverlabel
"""
return self["hoverlabel"] | [
"def",
"hoverlabel",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hoverlabel\"",
"]"
] | [
482,
4
] | [
532,
33
] | python | en | ['en', 'error', 'th'] | False |
Bar.hovertemplate | (self) |
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}".
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format for details on
the formatting syntax. Dates are formatted using d3-time-
format's syntax %{variable|d3-time-format}, for example "Day:
%{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
reference/blob/master/Time-Formatting.md#format for details on
the date formatting syntax. The variables available in
`hovertemplate` are the ones emitted as event data described at
this link https://plotly.com/javascript/plotlyjs-events/#event-
data. Additionally, every attributes that can be specified per-
point (the ones that are `arrayOk: true`) are available.
variables `value` and `label`. Anything contained in tag
`<extra>` is displayed in the secondary box, for example
"<extra>{fullData.name}</extra>". To hide the secondary box
completely, use an empty tag `<extra></extra>`.
The 'hovertemplate' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
|
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}".
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format for details on
the formatting syntax. Dates are formatted using d3-time-
format's syntax %{variable|d3-time-format}, for example "Day:
%{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
reference/blob/master/Time-Formatting.md#format for details on
the date formatting syntax. The variables available in
`hovertemplate` are the ones emitted as event data described at
this link https://plotly.com/javascript/plotlyjs-events/#event-
data. Additionally, every attributes that can be specified per-
point (the ones that are `arrayOk: true`) are available.
variables `value` and `label`. Anything contained in tag
`<extra>` is displayed in the secondary box, for example
"<extra>{fullData.name}</extra>". To hide the secondary box
completely, use an empty tag `<extra></extra>`.
The 'hovertemplate' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above | def hovertemplate(self):
"""
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}".
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format for details on
the formatting syntax. Dates are formatted using d3-time-
format's syntax %{variable|d3-time-format}, for example "Day:
%{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
reference/blob/master/Time-Formatting.md#format for details on
the date formatting syntax. The variables available in
`hovertemplate` are the ones emitted as event data described at
this link https://plotly.com/javascript/plotlyjs-events/#event-
data. Additionally, every attributes that can be specified per-
point (the ones that are `arrayOk: true`) are available.
variables `value` and `label`. Anything contained in tag
`<extra>` is displayed in the secondary box, for example
"<extra>{fullData.name}</extra>". To hide the secondary box
completely, use an empty tag `<extra></extra>`.
The 'hovertemplate' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
"""
return self["hovertemplate"] | [
"def",
"hovertemplate",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hovertemplate\"",
"]"
] | [
541,
4
] | [
573,
36
] | python | en | ['en', 'error', 'th'] | False |
Bar.hovertemplatesrc | (self) |
Sets the source reference on Chart Studio Cloud for
hovertemplate .
The 'hovertemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for
hovertemplate .
The 'hovertemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def hovertemplatesrc(self):
"""
Sets the source reference on Chart Studio Cloud for
hovertemplate .
The 'hovertemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["hovertemplatesrc"] | [
"def",
"hovertemplatesrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hovertemplatesrc\"",
"]"
] | [
582,
4
] | [
594,
39
] | python | en | ['en', 'error', 'th'] | False |
Bar.hovertext | (self) |
Sets hover 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. To be seen, trace
`hoverinfo` must contain a "text" flag.
The 'hovertext' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
|
Sets hover 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. To be seen, trace
`hoverinfo` must contain a "text" flag.
The 'hovertext' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above | def hovertext(self):
"""
Sets hover 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. To be seen, trace
`hoverinfo` must contain a "text" flag.
The 'hovertext' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
"""
return self["hovertext"] | [
"def",
"hovertext",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hovertext\"",
"]"
] | [
603,
4
] | [
620,
32
] | python | en | ['en', 'error', 'th'] | False |
Bar.hovertextsrc | (self) |
Sets the source reference on Chart Studio Cloud for hovertext
.
The 'hovertextsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for hovertext
.
The 'hovertextsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def hovertextsrc(self):
"""
Sets the source reference on Chart Studio Cloud for hovertext
.
The 'hovertextsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["hovertextsrc"] | [
"def",
"hovertextsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hovertextsrc\"",
"]"
] | [
629,
4
] | [
641,
35
] | python | en | ['en', 'error', 'th'] | False |
Bar.ids | (self) |
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.
The 'ids' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
|
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.
The 'ids' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def ids(self):
"""
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.
The 'ids' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["ids"] | [
"def",
"ids",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"ids\"",
"]"
] | [
650,
4
] | [
663,
26
] | python | en | ['en', 'error', 'th'] | False |
Bar.idssrc | (self) |
Sets the source reference on Chart Studio Cloud for ids .
The 'idssrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for ids .
The 'idssrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def idssrc(self):
"""
Sets the source reference on Chart Studio Cloud for ids .
The 'idssrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["idssrc"] | [
"def",
"idssrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"idssrc\"",
"]"
] | [
672,
4
] | [
683,
29
] | python | en | ['en', 'error', 'th'] | False |
Bar.insidetextanchor | (self) |
Determines if texts are kept at center or start/end points in
`textposition` "inside" mode.
The 'insidetextanchor' property is an enumeration that may be specified as:
- One of the following enumeration values:
['end', 'middle', 'start']
Returns
-------
Any
|
Determines if texts are kept at center or start/end points in
`textposition` "inside" mode.
The 'insidetextanchor' property is an enumeration that may be specified as:
- One of the following enumeration values:
['end', 'middle', 'start'] | def insidetextanchor(self):
"""
Determines if texts are kept at center or start/end points in
`textposition` "inside" mode.
The 'insidetextanchor' property is an enumeration that may be specified as:
- One of the following enumeration values:
['end', 'middle', 'start']
Returns
-------
Any
"""
return self["insidetextanchor"] | [
"def",
"insidetextanchor",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"insidetextanchor\"",
"]"
] | [
692,
4
] | [
705,
39
] | python | en | ['en', 'error', 'th'] | False |
Bar.insidetextfont | (self) |
Sets the font used for `text` lying inside the bar.
The 'insidetextfont' property is an instance of Insidetextfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Insidetextfont`
- A dict of string/value properties that will be passed
to the Insidetextfont constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud
for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud
for size .
Returns
-------
plotly.graph_objs.bar.Insidetextfont
|
Sets the font used for `text` lying inside the bar.
The 'insidetextfont' property is an instance of Insidetextfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Insidetextfont`
- A dict of string/value properties that will be passed
to the Insidetextfont constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud
for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud
for size . | def insidetextfont(self):
"""
Sets the font used for `text` lying inside the bar.
The 'insidetextfont' property is an instance of Insidetextfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Insidetextfont`
- A dict of string/value properties that will be passed
to the Insidetextfont constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud
for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud
for size .
Returns
-------
plotly.graph_objs.bar.Insidetextfont
"""
return self["insidetextfont"] | [
"def",
"insidetextfont",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"insidetextfont\"",
"]"
] | [
714,
4
] | [
761,
37
] | python | en | ['en', 'error', 'th'] | False |
Bar.legendgroup | (self) |
Sets the legend group for this trace. Traces part of the same
legend group hide/show at the same time when toggling legend
items.
The 'legendgroup' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
|
Sets the legend group for this trace. Traces part of the same
legend group hide/show at the same time when toggling legend
items.
The 'legendgroup' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def legendgroup(self):
"""
Sets the legend group for this trace. Traces part of the same
legend group hide/show at the same time when toggling legend
items.
The 'legendgroup' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"""
return self["legendgroup"] | [
"def",
"legendgroup",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"legendgroup\"",
"]"
] | [
770,
4
] | [
784,
34
] | python | en | ['en', 'error', 'th'] | False |
Bar.marker | (self) |
The 'marker' property is an instance of Marker
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
Supported dict properties:
autocolorscale
Determines whether the colorscale is a default
palette (`autocolorscale: true`) or the palette
determined by `marker.colorscale`. Has an
effect only if in `marker.color`is set to a
numerical array. In case `colorscale` is
unspecified or `autocolorscale` is true, the
default palette will be chosen according to
whether numbers in the `color` array are all
positive, all negative or mixed.
cauto
Determines whether or not the color domain is
computed with respect to the input data (here
in `marker.color`) or the bounds set in
`marker.cmin` and `marker.cmax` Has an effect
only if in `marker.color`is set to a numerical
array. Defaults to `false` when `marker.cmin`
and `marker.cmax` are set by the user.
cmax
Sets the upper bound of the color domain. Has
an effect only if in `marker.color`is set to a
numerical array. Value should have the same
units as in `marker.color` and if set,
`marker.cmin` must be set as well.
cmid
Sets the mid-point of the color domain by
scaling `marker.cmin` and/or `marker.cmax` to
be equidistant to this point. Has an effect
only if in `marker.color`is set to a numerical
array. Value should have the same units as in
`marker.color`. Has no effect when
`marker.cauto` is `false`.
cmin
Sets the lower bound of the color domain. Has
an effect only if in `marker.color`is set to a
numerical array. Value should have the same
units as in `marker.color` and if set,
`marker.cmax` must be set as well.
color
Sets themarkercolor. It accepts either a
specific color or an array of numbers that are
mapped to the colorscale relative to the max
and min values of the array or relative to
`marker.cmin` and `marker.cmax` if set.
coloraxis
Sets a reference to a shared color axis.
References to these shared color axes are
"coloraxis", "coloraxis2", "coloraxis3", etc.
Settings for these shared color axes are set in
the layout, under `layout.coloraxis`,
`layout.coloraxis2`, etc. Note that multiple
color scales can be linked to the same color
axis.
colorbar
:class:`plotly.graph_objects.bar.marker.ColorBa
r` instance or dict with compatible properties
colorscale
Sets the colorscale. Has an effect only if in
`marker.color`is set to a numerical array. 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
color space, use`marker.cmin` and
`marker.cmax`. Alternatively, `colorscale` may
be a palette name string of the following list:
Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
arth,Electric,Viridis,Cividis.
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
line
:class:`plotly.graph_objects.bar.marker.Line`
instance or dict with compatible properties
opacity
Sets the opacity of the bars.
opacitysrc
Sets the source reference on Chart Studio Cloud
for opacity .
reversescale
Reverses the color mapping if true. Has an
effect only if in `marker.color`is set to a
numerical array. If true, `marker.cmin` will
correspond to the last color in the array and
`marker.cmax` will correspond to the first
color.
showscale
Determines whether or not a colorbar is
displayed for this trace. Has an effect only if
in `marker.color`is set to a numerical array.
Returns
-------
plotly.graph_objs.bar.Marker
|
The 'marker' property is an instance of Marker
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
Supported dict properties:
autocolorscale
Determines whether the colorscale is a default
palette (`autocolorscale: true`) or the palette
determined by `marker.colorscale`. Has an
effect only if in `marker.color`is set to a
numerical array. In case `colorscale` is
unspecified or `autocolorscale` is true, the
default palette will be chosen according to
whether numbers in the `color` array are all
positive, all negative or mixed.
cauto
Determines whether or not the color domain is
computed with respect to the input data (here
in `marker.color`) or the bounds set in
`marker.cmin` and `marker.cmax` Has an effect
only if in `marker.color`is set to a numerical
array. Defaults to `false` when `marker.cmin`
and `marker.cmax` are set by the user.
cmax
Sets the upper bound of the color domain. Has
an effect only if in `marker.color`is set to a
numerical array. Value should have the same
units as in `marker.color` and if set,
`marker.cmin` must be set as well.
cmid
Sets the mid-point of the color domain by
scaling `marker.cmin` and/or `marker.cmax` to
be equidistant to this point. Has an effect
only if in `marker.color`is set to a numerical
array. Value should have the same units as in
`marker.color`. Has no effect when
`marker.cauto` is `false`.
cmin
Sets the lower bound of the color domain. Has
an effect only if in `marker.color`is set to a
numerical array. Value should have the same
units as in `marker.color` and if set,
`marker.cmax` must be set as well.
color
Sets themarkercolor. It accepts either a
specific color or an array of numbers that are
mapped to the colorscale relative to the max
and min values of the array or relative to
`marker.cmin` and `marker.cmax` if set.
coloraxis
Sets a reference to a shared color axis.
References to these shared color axes are
"coloraxis", "coloraxis2", "coloraxis3", etc.
Settings for these shared color axes are set in
the layout, under `layout.coloraxis`,
`layout.coloraxis2`, etc. Note that multiple
color scales can be linked to the same color
axis.
colorbar
:class:`plotly.graph_objects.bar.marker.ColorBa
r` instance or dict with compatible properties
colorscale
Sets the colorscale. Has an effect only if in
`marker.color`is set to a numerical array. 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
color space, use`marker.cmin` and
`marker.cmax`. Alternatively, `colorscale` may
be a palette name string of the following list:
Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
arth,Electric,Viridis,Cividis.
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
line
:class:`plotly.graph_objects.bar.marker.Line`
instance or dict with compatible properties
opacity
Sets the opacity of the bars.
opacitysrc
Sets the source reference on Chart Studio Cloud
for opacity .
reversescale
Reverses the color mapping if true. Has an
effect only if in `marker.color`is set to a
numerical array. If true, `marker.cmin` will
correspond to the last color in the array and
`marker.cmax` will correspond to the first
color.
showscale
Determines whether or not a colorbar is
displayed for this trace. Has an effect only if
in `marker.color`is set to a numerical array. | def marker(self):
"""
The 'marker' property is an instance of Marker
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
Supported dict properties:
autocolorscale
Determines whether the colorscale is a default
palette (`autocolorscale: true`) or the palette
determined by `marker.colorscale`. Has an
effect only if in `marker.color`is set to a
numerical array. In case `colorscale` is
unspecified or `autocolorscale` is true, the
default palette will be chosen according to
whether numbers in the `color` array are all
positive, all negative or mixed.
cauto
Determines whether or not the color domain is
computed with respect to the input data (here
in `marker.color`) or the bounds set in
`marker.cmin` and `marker.cmax` Has an effect
only if in `marker.color`is set to a numerical
array. Defaults to `false` when `marker.cmin`
and `marker.cmax` are set by the user.
cmax
Sets the upper bound of the color domain. Has
an effect only if in `marker.color`is set to a
numerical array. Value should have the same
units as in `marker.color` and if set,
`marker.cmin` must be set as well.
cmid
Sets the mid-point of the color domain by
scaling `marker.cmin` and/or `marker.cmax` to
be equidistant to this point. Has an effect
only if in `marker.color`is set to a numerical
array. Value should have the same units as in
`marker.color`. Has no effect when
`marker.cauto` is `false`.
cmin
Sets the lower bound of the color domain. Has
an effect only if in `marker.color`is set to a
numerical array. Value should have the same
units as in `marker.color` and if set,
`marker.cmax` must be set as well.
color
Sets themarkercolor. It accepts either a
specific color or an array of numbers that are
mapped to the colorscale relative to the max
and min values of the array or relative to
`marker.cmin` and `marker.cmax` if set.
coloraxis
Sets a reference to a shared color axis.
References to these shared color axes are
"coloraxis", "coloraxis2", "coloraxis3", etc.
Settings for these shared color axes are set in
the layout, under `layout.coloraxis`,
`layout.coloraxis2`, etc. Note that multiple
color scales can be linked to the same color
axis.
colorbar
:class:`plotly.graph_objects.bar.marker.ColorBa
r` instance or dict with compatible properties
colorscale
Sets the colorscale. Has an effect only if in
`marker.color`is set to a numerical array. 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
color space, use`marker.cmin` and
`marker.cmax`. Alternatively, `colorscale` may
be a palette name string of the following list:
Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,E
arth,Electric,Viridis,Cividis.
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
line
:class:`plotly.graph_objects.bar.marker.Line`
instance or dict with compatible properties
opacity
Sets the opacity of the bars.
opacitysrc
Sets the source reference on Chart Studio Cloud
for opacity .
reversescale
Reverses the color mapping if true. Has an
effect only if in `marker.color`is set to a
numerical array. If true, `marker.cmin` will
correspond to the last color in the array and
`marker.cmax` will correspond to the first
color.
showscale
Determines whether or not a colorbar is
displayed for this trace. Has an effect only if
in `marker.color`is set to a numerical array.
Returns
-------
plotly.graph_objs.bar.Marker
"""
return self["marker"] | [
"def",
"marker",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"marker\"",
"]"
] | [
793,
4
] | [
902,
29
] | python | en | ['en', 'error', 'th'] | False |
Bar.meta | (self) |
Assigns extra meta information associated with this trace that
can be used in various text attributes. Attributes such as
trace `name`, graph, axis and colorbar `title.text`, annotation
`text` `rangeselector`, `updatemenues` and `sliders` `label`
text all support `meta`. To access the trace `meta` values in
an attribute in the same trace, simply use `%{meta[i]}` where
`i` is the index or key of the `meta` item in question. To
access trace `meta` in layout attributes, use
`%{data[n[.meta[i]}` where `i` is the index or key of the
`meta` and `n` is the trace index.
The 'meta' property accepts values of any type
Returns
-------
Any|numpy.ndarray
|
Assigns extra meta information associated with this trace that
can be used in various text attributes. Attributes such as
trace `name`, graph, axis and colorbar `title.text`, annotation
`text` `rangeselector`, `updatemenues` and `sliders` `label`
text all support `meta`. To access the trace `meta` values in
an attribute in the same trace, simply use `%{meta[i]}` where
`i` is the index or key of the `meta` item in question. To
access trace `meta` in layout attributes, use
`%{data[n[.meta[i]}` where `i` is the index or key of the
`meta` and `n` is the trace index.
The 'meta' property accepts values of any type | def meta(self):
"""
Assigns extra meta information associated with this trace that
can be used in various text attributes. Attributes such as
trace `name`, graph, axis and colorbar `title.text`, annotation
`text` `rangeselector`, `updatemenues` and `sliders` `label`
text all support `meta`. To access the trace `meta` values in
an attribute in the same trace, simply use `%{meta[i]}` where
`i` is the index or key of the `meta` item in question. To
access trace `meta` in layout attributes, use
`%{data[n[.meta[i]}` where `i` is the index or key of the
`meta` and `n` is the trace index.
The 'meta' property accepts values of any type
Returns
-------
Any|numpy.ndarray
"""
return self["meta"] | [
"def",
"meta",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"meta\"",
"]"
] | [
911,
4
] | [
930,
27
] | python | en | ['en', 'error', 'th'] | False |
Bar.metasrc | (self) |
Sets the source reference on Chart Studio Cloud for meta .
The 'metasrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for meta .
The 'metasrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def metasrc(self):
"""
Sets the source reference on Chart Studio Cloud for meta .
The 'metasrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["metasrc"] | [
"def",
"metasrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"metasrc\"",
"]"
] | [
939,
4
] | [
950,
30
] | python | en | ['en', 'error', 'th'] | False |
Bar.name | (self) |
Sets the trace name. The trace name appear as the legend item
and on hover.
The 'name' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
|
Sets the trace name. The trace name appear as the legend item
and on hover.
The 'name' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def name(self):
"""
Sets the trace name. The trace name appear as the legend item
and on hover.
The 'name' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"""
return self["name"] | [
"def",
"name",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"name\"",
"]"
] | [
959,
4
] | [
972,
27
] | python | en | ['en', 'error', 'th'] | False |
Bar.offset | (self) |
Shifts the position where the bar is drawn (in position axis
units). In "group" barmode, traces that set "offset" will be
excluded and drawn in "overlay" mode instead.
The 'offset' property is a number and may be specified as:
- An int or float
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
|
Shifts the position where the bar is drawn (in position axis
units). In "group" barmode, traces that set "offset" will be
excluded and drawn in "overlay" mode instead.
The 'offset' property is a number and may be specified as:
- An int or float
- A tuple, list, or one-dimensional numpy array of the above | def offset(self):
"""
Shifts the position where the bar is drawn (in position axis
units). In "group" barmode, traces that set "offset" will be
excluded and drawn in "overlay" mode instead.
The 'offset' property is a number and may be specified as:
- An int or float
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
"""
return self["offset"] | [
"def",
"offset",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"offset\"",
"]"
] | [
981,
4
] | [
995,
29
] | python | en | ['en', 'error', 'th'] | False |
Bar.offsetgroup | (self) |
Set several traces linked to the same position axis or matching
axes to the same offsetgroup where bars of the same position
coordinate will line up.
The 'offsetgroup' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
|
Set several traces linked to the same position axis or matching
axes to the same offsetgroup where bars of the same position
coordinate will line up.
The 'offsetgroup' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def offsetgroup(self):
"""
Set several traces linked to the same position axis or matching
axes to the same offsetgroup where bars of the same position
coordinate will line up.
The 'offsetgroup' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"""
return self["offsetgroup"] | [
"def",
"offsetgroup",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"offsetgroup\"",
"]"
] | [
1004,
4
] | [
1018,
34
] | python | en | ['en', 'error', 'th'] | False |
Bar.offsetsrc | (self) |
Sets the source reference on Chart Studio Cloud for offset .
The 'offsetsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for offset .
The 'offsetsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def offsetsrc(self):
"""
Sets the source reference on Chart Studio Cloud for offset .
The 'offsetsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["offsetsrc"] | [
"def",
"offsetsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"offsetsrc\"",
"]"
] | [
1027,
4
] | [
1038,
32
] | python | en | ['en', 'error', 'th'] | False |
Bar.opacity | (self) |
Sets the opacity of the trace.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
|
Sets the opacity of the trace.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1] | def opacity(self):
"""
Sets the opacity of the trace.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
"""
return self["opacity"] | [
"def",
"opacity",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"opacity\"",
"]"
] | [
1047,
4
] | [
1058,
30
] | python | en | ['en', 'error', 'th'] | False |
Bar.orientation | (self) |
Sets the orientation of the bars. With "v" ("h"), the value of
the each bar spans along the vertical (horizontal).
The 'orientation' property is an enumeration that may be specified as:
- One of the following enumeration values:
['v', 'h']
Returns
-------
Any
|
Sets the orientation of the bars. With "v" ("h"), the value of
the each bar spans along the vertical (horizontal).
The 'orientation' property is an enumeration that may be specified as:
- One of the following enumeration values:
['v', 'h'] | def orientation(self):
"""
Sets the orientation of the bars. With "v" ("h"), the value of
the each bar spans along the vertical (horizontal).
The 'orientation' property is an enumeration that may be specified as:
- One of the following enumeration values:
['v', 'h']
Returns
-------
Any
"""
return self["orientation"] | [
"def",
"orientation",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"orientation\"",
"]"
] | [
1067,
4
] | [
1080,
34
] | python | en | ['en', 'error', 'th'] | False |
Bar.outsidetextfont | (self) |
Sets the font used for `text` lying outside the bar.
The 'outsidetextfont' property is an instance of Outsidetextfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Outsidetextfont`
- A dict of string/value properties that will be passed
to the Outsidetextfont constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud
for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud
for size .
Returns
-------
plotly.graph_objs.bar.Outsidetextfont
|
Sets the font used for `text` lying outside the bar.
The 'outsidetextfont' property is an instance of Outsidetextfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Outsidetextfont`
- A dict of string/value properties that will be passed
to the Outsidetextfont constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud
for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud
for size . | def outsidetextfont(self):
"""
Sets the font used for `text` lying outside the bar.
The 'outsidetextfont' property is an instance of Outsidetextfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Outsidetextfont`
- A dict of string/value properties that will be passed
to the Outsidetextfont constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud
for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud
for size .
Returns
-------
plotly.graph_objs.bar.Outsidetextfont
"""
return self["outsidetextfont"] | [
"def",
"outsidetextfont",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"outsidetextfont\"",
"]"
] | [
1089,
4
] | [
1136,
38
] | python | en | ['en', 'error', 'th'] | False |
Bar.r | (self) |
r coordinates in scatter traces are deprecated!Please switch to
the "scatterpolar" trace type.Sets the radial coordinatesfor
legacy polar chart only.
The 'r' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
|
r coordinates in scatter traces are deprecated!Please switch to
the "scatterpolar" trace type.Sets the radial coordinatesfor
legacy polar chart only.
The 'r' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def r(self):
"""
r coordinates in scatter traces are deprecated!Please switch to
the "scatterpolar" trace type.Sets the radial coordinatesfor
legacy polar chart only.
The 'r' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["r"] | [
"def",
"r",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"r\"",
"]"
] | [
1145,
4
] | [
1158,
24
] | python | en | ['en', 'error', 'th'] | False |
Bar.rsrc | (self) |
Sets the source reference on Chart Studio Cloud for r .
The 'rsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for r .
The 'rsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def rsrc(self):
"""
Sets the source reference on Chart Studio Cloud for r .
The 'rsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["rsrc"] | [
"def",
"rsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"rsrc\"",
"]"
] | [
1167,
4
] | [
1178,
27
] | python | en | ['en', 'error', 'th'] | False |
Bar.selected | (self) |
The 'selected' property is an instance of Selected
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Selected`
- A dict of string/value properties that will be passed
to the Selected constructor
Supported dict properties:
marker
:class:`plotly.graph_objects.bar.selected.Marke
r` instance or dict with compatible properties
textfont
:class:`plotly.graph_objects.bar.selected.Textf
ont` instance or dict with compatible
properties
Returns
-------
plotly.graph_objs.bar.Selected
|
The 'selected' property is an instance of Selected
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Selected`
- A dict of string/value properties that will be passed
to the Selected constructor
Supported dict properties:
marker
:class:`plotly.graph_objects.bar.selected.Marke
r` instance or dict with compatible properties
textfont
:class:`plotly.graph_objects.bar.selected.Textf
ont` instance or dict with compatible
properties | def selected(self):
"""
The 'selected' property is an instance of Selected
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Selected`
- A dict of string/value properties that will be passed
to the Selected constructor
Supported dict properties:
marker
:class:`plotly.graph_objects.bar.selected.Marke
r` instance or dict with compatible properties
textfont
:class:`plotly.graph_objects.bar.selected.Textf
ont` instance or dict with compatible
properties
Returns
-------
plotly.graph_objs.bar.Selected
"""
return self["selected"] | [
"def",
"selected",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"selected\"",
"]"
] | [
1187,
4
] | [
1209,
31
] | python | en | ['en', 'error', 'th'] | False |
Bar.selectedpoints | (self) |
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.
The 'selectedpoints' property accepts values of any type
Returns
-------
Any
|
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.
The 'selectedpoints' property accepts values of any type | def selectedpoints(self):
"""
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.
The 'selectedpoints' property accepts values of any type
Returns
-------
Any
"""
return self["selectedpoints"] | [
"def",
"selectedpoints",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"selectedpoints\"",
"]"
] | [
1218,
4
] | [
1233,
37
] | python | en | ['en', 'error', 'th'] | False |
Bar.showlegend | (self) |
Determines whether or not an item corresponding to this trace
is shown in the legend.
The 'showlegend' property must be specified as a bool
(either True, or False)
Returns
-------
bool
|
Determines whether or not an item corresponding to this trace
is shown in the legend.
The 'showlegend' property must be specified as a bool
(either True, or False) | def showlegend(self):
"""
Determines whether or not an item corresponding to this trace
is shown in the legend.
The 'showlegend' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
return self["showlegend"] | [
"def",
"showlegend",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"showlegend\"",
"]"
] | [
1242,
4
] | [
1254,
33
] | python | en | ['en', 'error', 'th'] | False |
Bar.stream | (self) |
The 'stream' property is an instance of Stream
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Stream`
- A dict of string/value properties that will be passed
to the Stream constructor
Supported dict properties:
maxpoints
Sets the maximum number of points to keep on
the plots from an incoming stream. If
`maxpoints` is set to 50, only the newest 50
points will be displayed on the plot.
token
The stream id number links a data trace on a
plot with a stream. See https://chart-
studio.plotly.com/settings for more details.
Returns
-------
plotly.graph_objs.bar.Stream
|
The 'stream' property is an instance of Stream
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Stream`
- A dict of string/value properties that will be passed
to the Stream constructor
Supported dict properties:
maxpoints
Sets the maximum number of points to keep on
the plots from an incoming stream. If
`maxpoints` is set to 50, only the newest 50
points will be displayed on the plot.
token
The stream id number links a data trace on a
plot with a stream. See https://chart-
studio.plotly.com/settings for more details. | def stream(self):
"""
The 'stream' property is an instance of Stream
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Stream`
- A dict of string/value properties that will be passed
to the Stream constructor
Supported dict properties:
maxpoints
Sets the maximum number of points to keep on
the plots from an incoming stream. If
`maxpoints` is set to 50, only the newest 50
points will be displayed on the plot.
token
The stream id number links a data trace on a
plot with a stream. See https://chart-
studio.plotly.com/settings for more details.
Returns
-------
plotly.graph_objs.bar.Stream
"""
return self["stream"] | [
"def",
"stream",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"stream\"",
"]"
] | [
1263,
4
] | [
1287,
29
] | python | en | ['en', 'error', 'th'] | False |
Bar.t | (self) |
t coordinates in scatter traces are deprecated!Please switch to
the "scatterpolar" trace type.Sets the angular coordinatesfor
legacy polar chart only.
The 't' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
|
t coordinates in scatter traces are deprecated!Please switch to
the "scatterpolar" trace type.Sets the angular coordinatesfor
legacy polar chart only.
The 't' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def t(self):
"""
t coordinates in scatter traces are deprecated!Please switch to
the "scatterpolar" trace type.Sets the angular coordinatesfor
legacy polar chart only.
The 't' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["t"] | [
"def",
"t",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"t\"",
"]"
] | [
1296,
4
] | [
1309,
24
] | python | en | ['en', 'error', 'th'] | False |
Bar.text | (self) |
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.
The 'text' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
|
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.
The 'text' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above | def text(self):
"""
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.
The 'text' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
"""
return self["text"] | [
"def",
"text",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"text\"",
"]"
] | [
1318,
4
] | [
1336,
27
] | python | en | ['en', 'error', 'th'] | False |
Bar.textangle | (self) |
Sets the angle of the tick labels with respect to the bar. For
example, a `tickangle` of -90 draws the tick labels vertically.
With "auto" the texts may automatically be rotated to fit with
the maximum size in bars.
The 'textangle' property is a angle (in degrees) that may be
specified as a number between -180 and 180. Numeric values outside this
range are converted to the equivalent value
(e.g. 270 is converted to -90).
Returns
-------
int|float
|
Sets the angle of the tick labels with respect to the bar. For
example, a `tickangle` of -90 draws the tick labels vertically.
With "auto" the texts may automatically be rotated to fit with
the maximum size in bars.
The 'textangle' property is a angle (in degrees) that may be
specified as a number between -180 and 180. Numeric values outside this
range are converted to the equivalent value
(e.g. 270 is converted to -90). | def textangle(self):
"""
Sets the angle of the tick labels with respect to the bar. For
example, a `tickangle` of -90 draws the tick labels vertically.
With "auto" the texts may automatically be rotated to fit with
the maximum size in bars.
The 'textangle' property is a angle (in degrees) that may be
specified as a number between -180 and 180. Numeric values outside this
range are converted to the equivalent value
(e.g. 270 is converted to -90).
Returns
-------
int|float
"""
return self["textangle"] | [
"def",
"textangle",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textangle\"",
"]"
] | [
1345,
4
] | [
1361,
32
] | python | en | ['en', 'error', 'th'] | False |
Bar.textfont | (self) |
Sets the font used for `text`.
The 'textfont' property is an instance of Textfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Textfont`
- A dict of string/value properties that will be passed
to the Textfont constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud
for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud
for size .
Returns
-------
plotly.graph_objs.bar.Textfont
|
Sets the font used for `text`.
The 'textfont' property is an instance of Textfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Textfont`
- A dict of string/value properties that will be passed
to the Textfont constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud
for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud
for size . | def textfont(self):
"""
Sets the font used for `text`.
The 'textfont' property is an instance of Textfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Textfont`
- A dict of string/value properties that will be passed
to the Textfont constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud
for color .
family
HTML font family - the typeface that will be
applied by the web browser. The web browser
will only be able to apply a font if it is
available on the system which it operates.
Provide multiple font families, separated by
commas, to indicate the preference in which to
apply fonts if they aren't available on the
system. The Chart Studio Cloud (at
https://chart-studio.plotly.com or on-premise)
generates images on a server, where only a
select number of fonts are installed and
supported. These include "Arial", "Balto",
"Courier New", "Droid Sans",, "Droid Serif",
"Droid Sans Mono", "Gravitas One", "Old
Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud
for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud
for size .
Returns
-------
plotly.graph_objs.bar.Textfont
"""
return self["textfont"] | [
"def",
"textfont",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textfont\"",
"]"
] | [
1370,
4
] | [
1417,
31
] | python | en | ['en', 'error', 'th'] | False |
Bar.textposition | (self) |
Specifies the location of the `text`. "inside" positions `text`
inside, next to the bar end (rotated and scaled if needed).
"outside" positions `text` outside, next to the bar end (scaled
if needed), unless there is another bar stacked on this one,
then the text gets pushed inside. "auto" tries to position
`text` inside the bar, but if the bar is too small and no bar
is stacked on this one the text is moved outside.
The 'textposition' property is an enumeration that may be specified as:
- One of the following enumeration values:
['inside', 'outside', 'auto', 'none']
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
Any|numpy.ndarray
|
Specifies the location of the `text`. "inside" positions `text`
inside, next to the bar end (rotated and scaled if needed).
"outside" positions `text` outside, next to the bar end (scaled
if needed), unless there is another bar stacked on this one,
then the text gets pushed inside. "auto" tries to position
`text` inside the bar, but if the bar is too small and no bar
is stacked on this one the text is moved outside.
The 'textposition' property is an enumeration that may be specified as:
- One of the following enumeration values:
['inside', 'outside', 'auto', 'none']
- A tuple, list, or one-dimensional numpy array of the above | def textposition(self):
"""
Specifies the location of the `text`. "inside" positions `text`
inside, next to the bar end (rotated and scaled if needed).
"outside" positions `text` outside, next to the bar end (scaled
if needed), unless there is another bar stacked on this one,
then the text gets pushed inside. "auto" tries to position
`text` inside the bar, but if the bar is too small and no bar
is stacked on this one the text is moved outside.
The 'textposition' property is an enumeration that may be specified as:
- One of the following enumeration values:
['inside', 'outside', 'auto', 'none']
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
Any|numpy.ndarray
"""
return self["textposition"] | [
"def",
"textposition",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textposition\"",
"]"
] | [
1426,
4
] | [
1445,
35
] | python | en | ['en', 'error', 'th'] | False |
Bar.textpositionsrc | (self) |
Sets the source reference on Chart Studio Cloud for
textposition .
The 'textpositionsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for
textposition .
The 'textpositionsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def textpositionsrc(self):
"""
Sets the source reference on Chart Studio Cloud for
textposition .
The 'textpositionsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["textpositionsrc"] | [
"def",
"textpositionsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textpositionsrc\"",
"]"
] | [
1454,
4
] | [
1466,
38
] | python | en | ['en', 'error', 'th'] | False |
Bar.textsrc | (self) |
Sets the source reference on Chart Studio Cloud for text .
The 'textsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for text .
The 'textsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def textsrc(self):
"""
Sets the source reference on Chart Studio Cloud for text .
The 'textsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["textsrc"] | [
"def",
"textsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textsrc\"",
"]"
] | [
1475,
4
] | [
1486,
30
] | python | en | ['en', 'error', 'th'] | False |
Bar.texttemplate | (self) |
Template string used for rendering the information text that
appear on points. Note that this will override `textinfo`.
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}".
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format for details on
the formatting syntax. Dates are formatted using d3-time-
format's syntax %{variable|d3-time-format}, for example "Day:
%{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
reference/blob/master/Time-Formatting.md#format for details on
the date formatting syntax. Every attributes that can be
specified per-point (the ones that are `arrayOk: true`) are
available. variables `value` and `label`.
The 'texttemplate' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
|
Template string used for rendering the information text that
appear on points. Note that this will override `textinfo`.
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}".
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format for details on
the formatting syntax. Dates are formatted using d3-time-
format's syntax %{variable|d3-time-format}, for example "Day:
%{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
reference/blob/master/Time-Formatting.md#format for details on
the date formatting syntax. Every attributes that can be
specified per-point (the ones that are `arrayOk: true`) are
available. variables `value` and `label`.
The 'texttemplate' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above | def texttemplate(self):
"""
Template string used for rendering the information text that
appear on points. Note that this will override `textinfo`.
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}".
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format for details on
the formatting syntax. Dates are formatted using d3-time-
format's syntax %{variable|d3-time-format}, for example "Day:
%{2019-01-01|%A}". https://github.com/d3/d3-3.x-api-
reference/blob/master/Time-Formatting.md#format for details on
the date formatting syntax. Every attributes that can be
specified per-point (the ones that are `arrayOk: true`) are
available. variables `value` and `label`.
The 'texttemplate' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
"""
return self["texttemplate"] | [
"def",
"texttemplate",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"texttemplate\"",
"]"
] | [
1495,
4
] | [
1521,
35
] | python | en | ['en', 'error', 'th'] | False |
Bar.texttemplatesrc | (self) |
Sets the source reference on Chart Studio Cloud for
texttemplate .
The 'texttemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for
texttemplate .
The 'texttemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def texttemplatesrc(self):
"""
Sets the source reference on Chart Studio Cloud for
texttemplate .
The 'texttemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["texttemplatesrc"] | [
"def",
"texttemplatesrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"texttemplatesrc\"",
"]"
] | [
1530,
4
] | [
1542,
38
] | python | en | ['en', 'error', 'th'] | False |
Bar.tsrc | (self) |
Sets the source reference on Chart Studio Cloud for t .
The 'tsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for t .
The 'tsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def tsrc(self):
"""
Sets the source reference on Chart Studio Cloud for t .
The 'tsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["tsrc"] | [
"def",
"tsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"tsrc\"",
"]"
] | [
1551,
4
] | [
1562,
27
] | python | en | ['en', 'error', 'th'] | False |
Bar.uid | (self) |
Assign an id to this trace, Use this to provide object
constancy between traces during animations and transitions.
The 'uid' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
|
Assign an id to this trace, Use this to provide object
constancy between traces during animations and transitions.
The 'uid' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def uid(self):
"""
Assign an id to this trace, Use this to provide object
constancy between traces during animations and transitions.
The 'uid' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"""
return self["uid"] | [
"def",
"uid",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"uid\"",
"]"
] | [
1571,
4
] | [
1584,
26
] | python | en | ['en', 'error', 'th'] | False |
Bar.uirevision | (self) |
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.
The 'uirevision' property accepts values of any type
Returns
-------
Any
|
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.
The 'uirevision' property accepts values of any type | def uirevision(self):
"""
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.
The 'uirevision' property accepts values of any type
Returns
-------
Any
"""
return self["uirevision"] | [
"def",
"uirevision",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"uirevision\"",
"]"
] | [
1593,
4
] | [
1617,
33
] | python | en | ['en', 'error', 'th'] | False |
Bar.unselected | (self) |
The 'unselected' property is an instance of Unselected
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Unselected`
- A dict of string/value properties that will be passed
to the Unselected constructor
Supported dict properties:
marker
:class:`plotly.graph_objects.bar.unselected.Mar
ker` instance or dict with compatible
properties
textfont
:class:`plotly.graph_objects.bar.unselected.Tex
tfont` instance or dict with compatible
properties
Returns
-------
plotly.graph_objs.bar.Unselected
|
The 'unselected' property is an instance of Unselected
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Unselected`
- A dict of string/value properties that will be passed
to the Unselected constructor
Supported dict properties:
marker
:class:`plotly.graph_objects.bar.unselected.Mar
ker` instance or dict with compatible
properties
textfont
:class:`plotly.graph_objects.bar.unselected.Tex
tfont` instance or dict with compatible
properties | def unselected(self):
"""
The 'unselected' property is an instance of Unselected
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.Unselected`
- A dict of string/value properties that will be passed
to the Unselected constructor
Supported dict properties:
marker
:class:`plotly.graph_objects.bar.unselected.Mar
ker` instance or dict with compatible
properties
textfont
:class:`plotly.graph_objects.bar.unselected.Tex
tfont` instance or dict with compatible
properties
Returns
-------
plotly.graph_objs.bar.Unselected
"""
return self["unselected"] | [
"def",
"unselected",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"unselected\"",
"]"
] | [
1626,
4
] | [
1649,
33
] | python | en | ['en', 'error', 'th'] | False |
Bar.visible | (self) |
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).
The 'visible' property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, 'legendonly']
Returns
-------
Any
|
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).
The 'visible' property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, 'legendonly'] | def visible(self):
"""
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).
The 'visible' property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, 'legendonly']
Returns
-------
Any
"""
return self["visible"] | [
"def",
"visible",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"visible\"",
"]"
] | [
1658,
4
] | [
1672,
30
] | python | en | ['en', 'error', 'th'] | False |
Bar.width | (self) |
Sets the bar width (in position axis units).
The 'width' property is a number and may be specified as:
- An int or float in the interval [0, inf]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
|
Sets the bar width (in position axis units).
The 'width' property is a number and may be specified as:
- An int or float in the interval [0, inf]
- A tuple, list, or one-dimensional numpy array of the above | def width(self):
"""
Sets the bar width (in position axis units).
The 'width' property is a number and may be specified as:
- An int or float in the interval [0, inf]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
"""
return self["width"] | [
"def",
"width",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"width\"",
"]"
] | [
1681,
4
] | [
1693,
28
] | python | en | ['en', 'error', 'th'] | False |
Bar.widthsrc | (self) |
Sets the source reference on Chart Studio Cloud for width .
The 'widthsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for width .
The 'widthsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def widthsrc(self):
"""
Sets the source reference on Chart Studio Cloud for width .
The 'widthsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["widthsrc"] | [
"def",
"widthsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"widthsrc\"",
"]"
] | [
1702,
4
] | [
1713,
31
] | python | en | ['en', 'error', 'th'] | False |
Bar.x | (self) |
Sets the x coordinates.
The 'x' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
|
Sets the x coordinates.
The 'x' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def x(self):
"""
Sets the x coordinates.
The 'x' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["x"] | [
"def",
"x",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"x\"",
"]"
] | [
1722,
4
] | [
1733,
24
] | python | en | ['en', 'error', 'th'] | False |
Bar.x0 | (self) |
Alternate to `x`. Builds a linear space of x coordinates. Use
with `dx` where `x0` is the starting coordinate and `dx` the
step.
The 'x0' property accepts values of any type
Returns
-------
Any
|
Alternate to `x`. Builds a linear space of x coordinates. Use
with `dx` where `x0` is the starting coordinate and `dx` the
step.
The 'x0' property accepts values of any type | def x0(self):
"""
Alternate to `x`. Builds a linear space of x coordinates. Use
with `dx` where `x0` is the starting coordinate and `dx` the
step.
The 'x0' property accepts values of any type
Returns
-------
Any
"""
return self["x0"] | [
"def",
"x0",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"x0\"",
"]"
] | [
1742,
4
] | [
1754,
25
] | python | en | ['en', 'error', 'th'] | False |
Bar.xaxis | (self) |
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.
The 'xaxis' property is an identifier of a particular
subplot, of type 'x', that may be specified as the string 'x'
optionally followed by an integer >= 1
(e.g. 'x', 'x1', 'x2', 'x3', etc.)
Returns
-------
str
|
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.
The 'xaxis' property is an identifier of a particular
subplot, of type 'x', that may be specified as the string 'x'
optionally followed by an integer >= 1
(e.g. 'x', 'x1', 'x2', 'x3', etc.) | def xaxis(self):
"""
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.
The 'xaxis' property is an identifier of a particular
subplot, of type 'x', that may be specified as the string 'x'
optionally followed by an integer >= 1
(e.g. 'x', 'x1', 'x2', 'x3', etc.)
Returns
-------
str
"""
return self["xaxis"] | [
"def",
"xaxis",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"xaxis\"",
"]"
] | [
1763,
4
] | [
1779,
28
] | python | en | ['en', 'error', 'th'] | False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.