Custom figures#
When the built-in plots aren't enough, assemble your own figure with charts
and show it with viz.show_figure. Here's a value-versus-temperature series
(see the multi-scan workbench) as a scatter plot:
fig = charts.Figure()
fig.add(charts.Scatter(x=temperatures, y=areas, mode="lines+markers", name="peak area"))
fig.update_layout(
title="Peak area vs temperature",
xaxis=charts.Axis(title="Temperature (K)"),
yaxis=charts.Axis(title="Normalised area"),
)
viz.show_figure(fig)
charts also offers Bar, Heatmap, and Contour, plus styling via
charts.Line, charts.Marker, and charts.Axis. A finished figure can be
shown with viz.show_figure or embedded in a report with reporting.add_figure
(see Save & share).