2
我想在图像上使用Plots.jl绘图,例如简单的正弦曲线。在这里我的代码:如何在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")
但我得到错误的结果。这是如何正确的?
感谢您的回答,您的代码出现错误:错误:LoadError:UndefVarError:adaptation_grid未定义 在E:\ Julia \ JPackages \ v0.5 \ Plots \ src \ series.jl:440 [内嵌]' –
但是,是的,我没有正确理解原理坐标的位置。 –
'Pkg.update()'应该有希望修复这个错误。 –