我正在尝试将基本图叠加到图像上。根据 Julia Docs 尚不清楚:http: //docs.juliaplots.org/latest/examples/pyplot/
如何在图像上绘图?这是我在 Julia 中的代码:
using Plots
x_coordinate_holder = [30515.4, 30515.4, 30490.9, 30470.7, 30470.7, 30450.9, 30450.0,
30450.0, 30450.0, 30450.0, 30450.0, 30430.8, 30449.2, 30469.4,
30469.4, 30469.4, 30489.2, 30489.2, 30489.2, 30509.4, 30529.1,
30549.4, 30569.2, 30589.3, 30590.0, 30609.2, 30610.0, 30610.0,
30590.7, 30590.7, 30590.7, 30570.8, 30570.0, 30570.0, 30589.4,
30589.4, 30589.4, 30590.0, 30570.6, 30550.8, 30569.2, 30569.2,
30589.4, 30589.4, 30570.6, 30570.6, 30570.6, 30570.6, 30550.8,
30530.6, 30510.8, 30510.0, 30510.0, 30529.3, 30549.1, 30549.1,
30569.3, 30570.0, 30589.3, 30590.0, 30590.0, 30590.0, 30609.3,
30610.0, 30610.0, 30610.0, 30629.2, 30649.4, 30669.2, 30689.4,
30709.2, 30710.0, 30710.0]
y_coordinate_holder = [14186.3, 14186.3, 14209.2, 14229.3, 14229.3, 14249.1, 14269.3,
14269.3, 14269.3, 14269.3, 14269.3, 14289.1, 14290.0, 14290.0,
14290.0, 14290.0, 14309.2, 14309.2, 14309.2, 14329.4, 14330.0,
14349.4, 14369.2, 14389.3, 14370.5, 14350.8, 14330.6, 14330.6,
14330.0, 14330.0, 14330.0, 14349.2, 14330.8, 14330.8, 14310.6,
14310.6, 14310.6, 14290.8, 14270.6, 14270.0, 14270.0, 14270.0,
14270.0, 14270.0, 14270.0, 14270.0, 14270.0, 14270.0, 14270.0,
14250.6, 14250.0, 14230.7, 14249.1, 14230.7, 14210.9, 14210.9,
14190.7, 14209.1, 14190.7, 14209.5, 14209.5, 14209.5, 14210.0,
14229.3, 14210.9, 14190.7, 14209.2, 14210.0, 14190.8, 14190.0,
14190.0, 14209.3, 14209.3]
plotly()
plot(x_coordinate_holder, y_coordinate_holder, color = :blue, linewidth=2)
gui()
注意:我查看了How plot on Images with Plots.jl?
这个例子不再起作用,这就是我再次问这个问题的原因。这是我更新的代码。
plotly()
img = Image("/path/to/image/file/exmaple/test.png)
plot(img)
plot!(x_coordinate_holder, y_coordinate_holder, color = :blue, linewidth=2)
gui() #Should open up a browser window/tab and show the plot in there.
运行此程序时,我收到以下错误:
* **ERROR: LoadError: UndefVarError: Image not defined** *
谁能提供一个完整的例子?