From 47b39f8ad9e860b590bae62b3a669c86eaad4372 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Wed, 24 Apr 2024 21:51:51 +0200 Subject: [PATCH] Update curve.html --- book/_static/curve.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/book/_static/curve.html b/book/_static/curve.html index f05eaf0..0c94604 100644 --- a/book/_static/curve.html +++ b/book/_static/curve.html @@ -82,6 +82,24 @@ }; Plotly.newPlot('outputContainer', data, layout); + + // Add arrows to the plot + for (var i = 0; i < xi.length; i++) { + var arrow = { + x: [xi[i], xi[i]], + y: [yi[i], Math.max(Math.min(a * xi[i] ** b + c, 1), 0)], + mode: 'lines', + line: { + color: 'red', + width: 1, + dash: 'dash' + }, + showlegend: false + }; + data.push(arrow); + } + + Plotly.update('outputContainer', data, layout); } var sliderContainer = document.getElementById("sliderContainer");