proj=:polar fails
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Domaine
- data-visualization
Piste de recherche
Reproduisez l’exemple documenté avec Julia 1.6.0 et PyPlot v2.10.0, puis examinez PyPlot.jl:177, où plot transmet les arguments nommés à matplotlib. Comparez cet appel avec les stack frames de matplotlib pyplot.py et avec l’exemple PyCall fonctionnel. Le travail est terminé lorsque l’exemple documenté proj=:polar s’exécute sans l’erreur Unknown property proj.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Julia 1.6.0
[d330b81b] PyPlot v2.10.0
Following https://docs.juliaplots.org/latest/generated/pyplot/#pyplot-ref27 ,
Θ = range(0, stop = 1.5π, length = 100)
r = abs.(0.1 * randn(100) + sin.(3Θ))
plot(Θ, r, proj = :polar, m = 2)
fails with "Unknown property proj", as below. PyCall is a workaround:
using PyCall
plt = pyimport("matplotlib.pyplot")
plt.axes(polar=true)
th = range(0, stop = 1.5π, length = 100)
r = abs.(0.1 * randn(100) + sin.(3*th))
plt.plot(th, r)
plt.show()
plot(Θ, r, proj = :polar, m = 2)
ERROR: PyError ($(Expr(:escape, :(ccall(#= /home/ben/.julia/packages/PyCall/3fwVL/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'AttributeError'>
AttributeError('Unknown property proj',)
File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 3261, in plot
ret = ax.plot(*args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/__init__.py", line 1718, in inner
return func(ax, *args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/axes/_axes.py", line 1372, in plot
for line in self._get_lines(*args, **kwargs):
File "/usr/lib/python3/dist-packages/matplotlib/axes/_base.py", line 404, in _grab_next_args
for seg in self._plot_args(this, kwargs):
File "/usr/lib/python3/dist-packages/matplotlib/axes/_base.py", line 394, in _plot_args
seg = func(x[:, j % ncx], y[:, j % ncy], kw, kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/axes/_base.py", line 301, in _makeline
seg = mlines.Line2D(x, y, **kw)
File "/usr/lib/python3/dist-packages/matplotlib/lines.py", line 426, in __init__
self.update(kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 902, in update
for k, v in props.items()]
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 902, in <listcomp>
for k, v in props.items()]
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 895, in _update_property
raise AttributeError('Unknown property %s' % k)
Stacktrace:
[1] pyerr_check
@ ~/.julia/packages/PyCall/3fwVL/src/exception.jl:62 [inlined]
[2] pyerr_check
@ ~/.julia/packages/PyCall/3fwVL/src/exception.jl:66 [inlined]
[3] _handle_error(msg::String)
@ PyCall ~/.julia/packages/PyCall/3fwVL/src/exception.jl:83
[4] macro expansion
@ ~/.julia/packages/PyCall/3fwVL/src/exception.jl:97 [inlined]
[5] #107
@ ~/.julia/packages/PyCall/3fwVL/src/pyfncall.jl:43 [inlined]
[6] disable_sigint
@ ./c.jl:458 [inlined]
[7] __pycall!
@ ~/.julia/packages/PyCall/3fwVL/src/pyfncall.jl:42 [inlined]
[8] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Vector{Float64}}, nargs::Int64, kw::PyCall.PyObject)
@ PyCall ~/.julia/packages/PyCall/3fwVL/src/pyfncall.jl:29
[9] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Vector{Float64}}, kwargs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:proj, :m), Tuple{Symbol, Int64}}})
@ PyCall ~/.julia/packages/PyCall/3fwVL/src/pyfncall.jl:11
[10] pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, ::Vararg{Any, N} where N; kwargs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:proj, :m), Tuple{Symbol, Int64}}})
@ PyCall ~/.julia/packages/PyCall/3fwVL/src/pyfncall.jl:83
[11] plot(::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, ::Vararg{Any, N} where N; kws::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:proj, :m), Tuple{Symbol, Int64}}})
@ PyPlot ~/.julia/packages/PyPlot/XaELc/src/PyPlot.jl:177
[12] top-level scope
@ REPL[5]:1
- Langage dominant
- Julia
- Étoiles
- 489
- Forks
- 90
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de JuliaPy/PyPlot.jl
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
-
julia PyPlot support missing dataPeut-être pris @deszoeke l’a pris il y a 675 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
-
colors has no field TwoSlopeNormOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 30/100
-
PGF preamble is not usedOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
-
Problem in using PyPlot in JuliaOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
Toutes les issues de JuliaPy/PyPlot.jl
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
JuliaGPU/KernelAbstractions.jl#897 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
oscar-system/GAP.jl#1455 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
JuliaAI/MLJTransforms.jl#85 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
SciML/OrdinaryDiffEq.jl#4875 ·
Les mainteneurs répondent en général sous 4 jours