For example I have wrote this code below to generate the following graph:
const trace = {
x: [-51.0, -50.0, 0.0, 0.6, 0.7, 0.75],
y: [-100.0, -0.0001, 0.0, 0.0051, 0.0155, 100.0],
// x: [-50.0, 0.0, 0.6, 0.7, 0.75],
// y: [-0.0001, 0.0, 0.0051, 0.0155, 100.0],
type: "scatter",
mode: "lines+markers",
name: "diode-curve-graph",
fill: "tonexty",
};
const layout = {
margin: {
l: 20,
r: 10,
b: 25,
t: 5,
pad: 0
},
font: {
size: 11,
family: "IBM Plex Sans, sans-serif",
color: "#161b1d"
},
modebar: {
activecolor: "#161b1d"
},
xaxis: {
autorange: true,
rangemode: "auto",
zeroline: true,
ticks: 'outside',
},
yaxis: {
autorange: true,
rangemode: "tozero",
zeroline: true,
tickformatstops: [
{
enabled: true,
dtickrange: [null, 0.01],
value: ".e"
},
{
enabled: true,
dtickrange: [0.01, 100],
value: ".f"
},
{
enabled: true,
dtickrange: [100, null],
value: ".e"
},
],
// ticks: 'outside',
}
};
const config = {
responsive: true,
displaylogo: false,
locale: "pt-BR",
displayModeBar: false,
scrollZoom: true
}
Plotly.newPlot("diode-curve-graph", [trace], layout, config);
But I'm trying to pass the information that the line is infinity, without beginning and end, like this red line represents:
It could be a simple arrow in the first point and last point pointing to the direction that the lines continues, but I couldn't do it too.
Thanks in advance!