Dear all
I am using PlotlyJS (I need its interactivity)
it is my code:
k1 = equ1
k2 = equ2
k3 = equ3
k4 = equ4
push!(k1_x, real(k1))
push!(k1_y, imag(k1))
push!(k2_x, real(k2))
push!(k2_y, imag(k2))
push!(k3_x, real(k3))
push!(k3_y, imag(k3))
push!(k4_x, real(k4))
push!(k4_y, imag(k4))
end
# Connect the four points to form a rectangle
push!(k1_x, k3_x[end])
push!(k1_y, k3_y[end])
push!(k2_x, k4_x[end])
push!(k2_y, k4_y[end])
trace1 = scatter(; x = k1_x, y = k1_y,
mode = "markers", name = "", line_color = "blue", line_width = 1.5)
trace2 = scatter(; x = k3_x, y = k3_y,
mode = "markers", name = "", line_color = "red", line_width = 1.5)
trace3 = scatter(; x = k2_x, y = k2_y,
mode = "markers", name = "", line_color = "green", line_width = 1.5)
trace4 = scatter(; x = k4_x, y = k4_y,
mode = "markers", name = "", line_color = "magenta", line_width = 1.5)
layout = Layout(; title = "Kharitonov Rectangles",
xaxis_title = "Real",
yaxis_title = "Imaginary",
showlegend = false)
plot([trace1, trace2, trace3, trace4], layout)
end
rectangles()
I want to connect red point to green with a line, green to pink, pink to blue and blue to red (create a square), but I tried several method which was not worked, I do not want to connect all reds point to gather in different frequencies and same for other points, I want to make an individual square in each frequency,
your help will be appreciated.