如何使用implicit_plot指定颜色
using ImplicitPlots, Plots
v = [(x,y) -> (x+3)*(y^3-7)+18, (x,y) -> sin(y*exp(x)-1)]
p = plot()
for f in v
implicit_plot!(f; xlims = (-1, 3), ylims = (-1, 2), framestyle = :origin, lc = [:red, :blue])
end
p

我所期望的大概是这样的:
lc = [:red, :blue]
for (i, f) in enumerate (v)
implicit_plot!(f; xlims = (-1, 3), ylims = (-1, 2), lc = lc[i])
end如何为第二个函数传递蓝色渐变?(我可以传递lc = :blues,但这也会使第一行代码变为蓝色。)
附加问题:我可以向implicit_plot传递一个向量或元组吗?我猜它不受支持。
发布于 2021-05-11 09:14:12
你确定它不工作吗?我试过了
lc = [:red, :blue]
for (i, f) in enumerate(v)
implicit_plot!(f; xlims = (-1, 3), ylims = (-1, 2), lc = lc[i])
end我得到了

(你在enumerate中有额外的空间,这可能会让你失望?)
不确定函数的元组。
https://stackoverflow.com/questions/67478715
复制相似问题