Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Update curve.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-van-Woudenberg committed Apr 24, 2024
1 parent 05a150a commit 47b39f8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions book/_static/curve.html
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 47b39f8

Please sign in to comment.