Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projection option for add_subplot #458

Closed
adamnemecek opened this issue Sep 6, 2019 · 1 comment
Closed

Projection option for add_subplot #458

adamnemecek opened this issue Sep 6, 2019 · 1 comment

Comments

@adamnemecek
Copy link

Hello,
When I call fig.add_subplot with the projection option, I get an error.

Code:

using PyPlot
fig = plt.figure()
ax = fig[:add_subplot](111, projection="3d")

Error:

ERROR: PyError ($(Expr(:escape, :(ccall(#= /Users/adamnemecek/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:44 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'ValueError'>
ValueError("Unknown projection '3d'")
  File "/Users/adamnemecek/.julia/conda/3/lib/python3.7/site-packages/matplotlib/figure.py", line 1396, in add_subplot
    self._process_projection_requirements(*args, **kwargs)
  File "/Users/adamnemecek/.julia/conda/3/lib/python3.7/site-packages/matplotlib/figure.py", line 1120, in _process_projection_requirements
    projection_class = projections.get_projection_class(projection)
  File "/Users/adamnemecek/.julia/conda/3/lib/python3.7/site-packages/matplotlib/projections/__init__.py", line 60, in get_projection_class
    raise ValueError("Unknown projection %r" % projection)

Stacktrace:
 [1] pyerr_check at /Users/adamnemecek/.julia/packages/PyCall/ttONZ/src/exception.jl:60 [inlined]
 [2] pyerr_check at /Users/adamnemecek/.julia/packages/PyCall/ttONZ/src/exception.jl:64 [inlined]
 [3] macro expansion at /Users/adamnemecek/.julia/packages/PyCall/ttONZ/src/exception.jl:84 [inlined]
 [4] __pycall!(::PyCall.PyObject, ::Ptr{PyCall.PyObject_struct}, ::PyCall.PyObject, ::PyCall.PyObject) at /Users/adamnemecek/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:44
 [5] _pycall!(::PyCall.PyObject, ::PyCall.PyObject, ::Tuple{Int64}, ::Int64, ::PyCall.PyObject) at /Users/adamnemecek/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:29
 [6] _pycall!(::PyCall.PyObject, ::PyCall.PyObject, ::Tuple{Int64}, ::Base.Iterators.Pairs{Symbol,String,Tuple{Symbol},NamedTuple{(:projection,),Tuple{String}}}) at /Users/adamnemecek/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:11
 [7] #call#111 at /Users/adamnemecek/.julia/packages/PyCall/ttONZ/src/pyfncall.jl:89 [inlined]
 [8] (::getfield(PyCall, Symbol("#kw#PyObject")))(::NamedTuple{(:projection,),Tuple{String}}, ::PyCall.PyObject, ::Int64) at ./none:0
 [9] top-level scope at none:0
@adamnemecek
Copy link
Author

adamnemecek commented Sep 9, 2019

Actually this was a problem on my end. My bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant