Hi all,
I try this code:
using Plots, LaTeXStrings
z1 = 4+2im
z2 = 4-2im
z3 = z1+z2
z4 = z1-z2
plot([z1], framestyle = :zerolines, label=L"z = 4 + 2i"; st=:scatter, legend=:outerright)
plot!([z2], label=L"z = 4 - 2i"; st=:scatter)
plot!([z3], label=L"z + \bar{z} = \ 2a"; st=:scatter)
plot!([z4], label=L"z - \bar{z} = \ 2ib"; st=:scatter)
# vertical green line connecting the dots
plot!([0,4],[4,2], label="", linecolor=:green, linestyle=:dash)
plot!([8,4],[0,2], label="", linecolor=:green, linestyle=:dash)
plot!([8,4],[0,-2], label="", linecolor=:green, linestyle=:dash)
plot!([0,4],[0,2], label="", linecolor=:green, linestyle=:dash)
plot!([0,4],[0,-2], label="", linecolor=:green, linestyle=:dash)
it plots nicely, but I wonder why I can’t use:
plot!([z1],[z2], label="", linecolor=:green, linestyle=:dash)
error:
MethodError: no method matching isless(::Float64, ::ComplexF64)
instead of the old plot a line code…