Je suis très nouveau à Julia. J'ai essayé un exemple de code posté sur le site Julia qui utilise Gadfly pour démontrer le complot. Cependant, cela me donne l'erreur ci-dessous. Je crois que tous les paquets dépendants ont été installés.
code:Erreur d'utilisation du paquet Gadfly dans Julia
Pkg.add("Gadfly")
using Gadfly
draw(SVG("output.svg", 6inch, 3inch), plot([sin, cos], 0, 25))
erreur je suis arrivé est:
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
Quel est le problème avec cet exemple de code?
Essayez peut-être (a) de quitter et de redémarrer Julia, (b) d'exécuter 'Pkg.update()', (c) b) alors (a)? –
Vous semblez appeler 'plot' associé à PyPlot: essayez de redémarrer et de ne charger que Gadfly. –
Je vous conseille de consulter [Plots.jl] (https://juliaplots.github.io/) pour le traçage agnostique backend en utilisant la même API cohérente sur tous les backends supportés (Gadfly et PyPlot inclus). – SalchiPapa