Asymmetric Error Bars
Mix.install([
{:plotly_ex, "~> 0.3"},
{:kino, "~> 0.18"}
])
Section
arrayminus: sets the downward (or leftward) error values independently from array: (upward/rightward).
Without arrayminus, both directions use array: symmetrically.
alias Plotly.{Figure, Scatter}
Figure.new()
|> Figure.add_trace(
Scatter.new(
x: [1, 2, 3, 4],
y: [2, 1, 3, 4],
mode: "markers",
error_y: %{
type: "data",
array: [0.1, 0.2, 0.3, 0.4],
arrayminus: [0.4, 0.3, 0.2, 0.1],
visible: true
}
)
)
|> Figure.update_layout(title: "Asymmetric Error Bars")
|> Plotly.show()