我对朱莉娅很陌生。我尝试了在 Julia 网站上发布的示例代码,它使用 Gadfly 来演示绘图。但是,它给了我以下错误。我相信所有依赖包都已安装。
代码:
Pkg.add("Gadfly")
using Gadfly
draw(SVG("output.svg", 6inch, 3inch), plot([sin, cos], 0, 25))
我得到的错误是:
ERROR: PyError (:PyObject_Call) <type 'exceptions.ValueError'>
ValueError('third arg must be a format string',)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/pyplot.py", line 2987, in plot
ret = ax.plot(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py", line 4137, in plot
for line in self._get_lines(*args, **kwargs):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py", line 317, in _grab_next_args
for seg in self._plot_args(remaining, kwargs):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py", line 279, in _plot_args
raise ValueError('third arg must be a format string')
[inlined code] from /Users/mango/.julia/v0.4/PyCall/src/exception.jl:81
in _pycall at /Users/mango/.julia/v0.4/PyCall/src/PyCall.jl:546
in pycall at /Users/mango/.julia/v0.4/PyCall/src/PyCall.jl:568
in plot at /Users/mango/.julia/v0.4/PyPlot/src/PyPlot.jl:395
这个示例代码有什么问题?