spatialmath-python icon indicating copy to clipboard operation
spatialmath-python copied to clipboard

T.plot(color='red', label='2') error

Open kunlina opened this issue 3 years ago • 2 comments

python3

Python 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from spatialmath import T = SE3(0.5, 0.0, 0.0) * SE3.RPY([0.1, 0.2, 0.3], order='xyz') * SE3.Rx(-90, unit='deg') T.plot(color='red', label='2') 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 "", line 1, in File "/home/knd/work/Robots/spatialmath-python/spatialmath/baseposematrix.py", line 830, in plot base.trplot(self.A, *args, **kwargs) File "/home/knd/work/Robots/spatialmath-python/spatialmath/base/transforms3d.py", line 2032, in trplot ax = fig.add_subplot(111, projection='3d', proj_type=projection) 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'

pip3 list

Package Version Location


alabaster 0.7.8
ansitable 0.9.5
apturl 0.5.2
Babel 2.6.0
backcall 0.1.0
bcrypt 3.1.7
beautifulsoup4 4.8.2
blinker 1.4
breezy 3.0.2
Brlapi 0.7.0
catfish 1.4.13
catkin-pkg 0.4.16
certifi 2019.11.28
chardet 3.0.4
chrome-gnome-shell 0.0.0
Click 7.0
colorama 0.4.3
colored 1.4.2
command-not-found 0.3
configobj 5.0.6
cryptography 2.8
css-parser 1.0.4
cssselect 1.1.0
cssutils 1.0.2
cupshelpers 1.0
cx-Freeze 6.4.2
cycler 0.10.0
dblatex 0.3.11py3
dbus-python 1.2.16
decorator 4.4.2
defer 1.0.6
defusedxml 0.6.0
Deprecated 1.2.7
distro 1.4.0
distro-info 0.23ubuntu1
dnspython 1.16.0
docutils 0.16
dulwich 0.19.15
duplicity 0.8.12.0
dxf2gcode 20191025
empy 3.3.2
entrypoints 0.3
fasteners 0.14.1
fastimport 0.9.8
feedparser 5.2.1
future 0.18.2
galternatives 1.0.6
gencpp 0.6.2
genlisp 0.4.17
genmsg 0.5.14
genpy 0.6.9
gpg 1.13.1-unknown
greenlet 0.4.15
guacamole 0.9.2
Guake 3.6.3
html5lib 1.0.1
httplib2 0.14.0
idna 2.8
imagesize 1.2.0
importlib-metadata 3.3.0
ipython 7.13.0
ipython-genutils 0.2.0
jedi 0.15.2
Jinja2 2.10.1
kazam 1.4.5
keyring 18.0.1
kiwisolver 1.0.1
language-selector 0.1
launchpadlib 1.10.13
lazr.restfulclient 0.14.2
lazr.uri 1.0.3
libvirt-python 6.1.0
lightdm-gtk-greeter-settings 1.2.2
lockfile 0.12.2
louis 3.12.0
lxml 4.5.0
macaroonbakery 1.3.1
Mako 1.1.0
Markdown 3.1.1
MarkupSafe 1.1.0
matplotlib 3.1.2
meld 3.20.2
menulibre 2.2.1
meteo-qt 1.5
mock 3.0.5
monotonic 1.5
msgpack 0.6.2
mugshot 0.4.2
netifaces 0.10.4
nose 1.3.7
numpy 1.17.4
oauthlib 3.1.0
olefile 0.46
onboard 1.4.1
packaging 20.3
padme 1.1.1
paramiko 2.6.0
parso 0.5.2
pbr 5.4.5
pexpect 4.6.0
pickleshare 0.7.5
Pillow 7.0.0
pip 20.0.2
prompt-toolkit 2.0.10
protobuf 3.6.1
psutil 5.5.1
pyasn1 0.4.2
pycairo 1.16.2
pycrypto 2.6.1
pycups 1.9.73
pycurl 7.43.0.2
PyGithub 1.43.7
Pygments 2.3.1
PyGObject 3.36.0
PyJWT 1.7.1
pymacaroons 0.13.0
PyNaCl 1.3.0
pynvim 0.4.1
PyOpenGL 3.1.0
pyparsing 2.4.6
PyQt5 5.14.1
pyRFC3339 1.1
PySide2 5.15.1
python-apt 2.0.0+ubuntu0.20.4.3 python-dateutil 2.7.3
python-debian 0.1.36ubuntu1
python-gitlab 2.0.1
python-gnupg 0.4.5
python-qt-binding 0.3.6
python-xlib 0.23
pytz 2019.3
pyxattr 0.6.1
pyxdg 0.26
PyYAML 5.3.1
QtPy 1.9.0
regex 2019.8.19
reportlab 3.5.34
requests 2.22.0
requests-unixsocket 0.2.0
roman 2.0.0
rosdep 0.18.0
rosdistro 0.8.0
rosinstall 0.7.8
rosinstall-generator 0.1.18
rospkg 1.2.3
scipy 1.6.2
SecretStorage 2.3.1
setuptools 45.2.0
sgt-launcher 0.2.5
shiboken2 5.15.1
simplejson 3.16.0
sip 4.19.21
six 1.14.0
soupsieve 1.9.5
spatialmath-python 0.9.5 /home/knd/work/Robots/spatialmath-python Sphinx 1.8.5
ssh-import-id 5.10
system-service 0.3
systemd-python 234
traitlets 4.3.3
ubuntu-advantage-tools 20.3
ubuntu-drivers-common 0.0.0
ufw 0.36
unattended-upgrades 0.1
unity-scope-calculator 0.1
unity-scope-devhelp 0.1
unity-scope-manpages 0.1
unity-scope-tomboy 0.1
unity-scope-virtualbox 0.1
unity-scope-yelp 0.1
unity-scope-zotero 0.1
urllib3 1.25.8
urwid 2.0.1
usb-creator 0.3.7
vboxapi 1.0
vcstools 0.1.42
wadllib 1.3.3
wcwidth 0.1.8
webencodings 0.5.1
wheel 0.34.2
wrapt 1.11.2
wstool 0.1.18
wxPython 4.0.7
xcffib 0.8.1
xdiagnose 3.8.9
xkit 0.0.0
XlsxWriter 1.1.2
Yapps2 2.2.1
youtube-dl 2020.3.24
zipp 3.4.0

kunlina avatar Apr 12 '21 03:04 kunlina

what was the code that caused the issue?

petercorke avatar Apr 19 '21 09:04 petercorke

Did you have an active 2D plot before you did this?

petercorke avatar May 23 '21 02:05 petercorke