Skip to content

Commit b029d2c

Browse files
authored
Implementation of backend plotting for params_plot (#641)
1 parent d9f31d1 commit b029d2c

File tree

3 files changed

+216
-121
lines changed

3 files changed

+216
-121
lines changed

src/optimagic/visualization/backends.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _line_plot_plotly(
3838
legend_properties: dict[str, Any] | None,
3939
) -> go.Figure:
4040
if template is None:
41-
template = "plotly"
41+
template = "simple_white"
4242

4343
fig = go.Figure()
4444

@@ -49,6 +49,7 @@ def _line_plot_plotly(
4949
name=line.name,
5050
line_color=line.color,
5151
mode="lines",
52+
showlegend=line.show_in_legend,
5253
)
5354
fig.add_trace(trace)
5455

@@ -123,6 +124,8 @@ def line_plot(
123124
124125
Args:
125126
lines: List of objects each containing data for a line in the plot.
127+
The order of lines in the list determines the order in which they are
128+
plotted, with later lines being rendered on top of earlier ones.
126129
backend: The backend to use for plotting.
127130
title: Title of the plot.
128131
xlabel: Label for the x-axis.

0 commit comments

Comments
 (0)