我想使用Plots.jl在图像上绘图,例如简单的正弦曲线。下面是我的代码:
using Plots
using Images
gr()
h = 400
w = 600
a = Array(RGB{FixedPointNumbers.UFixed{UInt8,8}}, h, w)
img = Image(a)
p=plot(img)
x = collect(0:0.1:2π)
plot!(x,sin(x))
png("Test")但是我得到了错误的结果。如何正确地做到这一点?
发布于 2017-01-18 03:54:24
这里有一个简单的例子,我希望能给你一些线索:
julia> plot(img)
julia> plot!(x->200sin(.05x)+300, 0, 700, w=5)

您可能只想确保打印到与图像匹配的正确坐标。
https://stackoverflow.com/questions/41704558
复制相似问题