Hi, I’m trying to include a picture in a scatter plot, which I can hopefully then make it extend from the origin (0,0) to some value (xpoint,ypoint). My picture is located in a local directory on the same level as the .md file. Here is the code I have written:
<div class="card" id="phaseSpace" style="cursor: crosshair">${
resize((width) => Plot.plot({
title: "Phase Space",
x: { domain: [0, 1] }, // Adjust according to your data scale
y: { domain: [0, 5] },
marks: [
Plot.image({x: 0, y: 0, src: "./best_param.png", preserveAspectRatio: "none"}),
Plot.ruleY([0]),
Plot.ruleX([0]),
//Plot.frame(),
Plot.dot(currentpoint, {x: "x", y: "y", curve: "step", stroke: "black"}),
Plot.dot(bestpoints, {x: "x", y: "y", curve: "step", stroke: "red"}),
Plot.axisX({anchor: "bottom", label: "energy"}),
]
}))
}</div>
The problem I’m having is that all the points and axes show up correctly, but the image does not show on the plot. I’d appreciate some help from the community.
Thank you!
– Jose