<!DOCTYPE html>
<html>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<body>
<div id="myPlot" style="width:100%;max-width:700px"></div>
<script>
let slope = 1.2;
let intercept = 7;
const xValues = [];
const yValues = [];
for (let x = 0; x <= 10; x += 1) {
xValues.push(x);
yValues.push(x * slope + intercept);
}
const data = [{
x: xValues,
y: yValues,
mode: "lines"
}];
let layout = {title: "Slope=" + slope + " Intercept=" + intercept};
Plotly.newPlot("myPlot", data, layout);
</script>
</body>
</html>