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

Unknown projection '3d' in multistage_drone_race.py example #7

Open
ivrolan opened this issue May 4, 2023 · 0 comments
Open

Unknown projection '3d' in multistage_drone_race.py example #7

ivrolan opened this issue May 4, 2023 · 0 comments

Comments

@ivrolan
Copy link

ivrolan commented May 4, 2023

When executing multistage_drone_race.py with matplotlib version 3.1.2, a Value error arises:

See Traceback

      Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/matplotlib/projections/__init__.py", line 58, in get_projection_class
    return projection_registry.get_projection_class(projection)
  File "/usr/lib/python3/dist-packages/matplotlib/projections/__init__.py", line 25, in get_projection_class
    return self._all_projection_types[name]
KeyError: '3d'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "multistage_drone_race.py", line 352, in <module>
    ax = fig.gca(projection='3d')
  File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 1932, in gca
    return self.add_subplot(1, 1, 1, **kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 1396, in add_subplot
    self._process_projection_requirements(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 1120, in _process_projection_requirements
    projection_class = projections.get_projection_class(projection)
  File "/usr/lib/python3/dist-packages/matplotlib/projections/__init__.py", line 60, in get_projection_class
    raise ValueError("Unknown projection %r" % projection)
ValueError: Unknown projection '3d'

I fixed this issue in the pull-request I will open by adding this line to the example as in this StackOverflow Question:

from mpl_toolkits.mplot3d import Axes3D
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