Ask Your Question
3

rqt_plot did not work

asked 2020-03-17 06:15:04 -0600

sustech_noob gravatar image

updated 2020-03-17 07:31:16 -0600

gvdhoorn gravatar image

When I was learning beginner level tutorial, 6. Understanding ROS Topics with ROS kinetic on Ubuntu, no new window appeared after running

rosrun rqt_plot rqt_plot

and the error info is:

/usr/lib/python2.7/dist-packages/matplotlib/axis.py:1015: UserWarning: Unable to find pixel distance along axis for interval padding of ticks; assuming no interval padding needed.
  warnings.warn("Unable to find pixel distance along axis "
/usr/lib/python2.7/dist-packages/matplotlib/axis.py:1025: UserWarning: Unable to find pixel distance along axis for interval padding of ticks; assuming no interval padding needed.
  warnings.warn("Unable to find pixel distance along axis "
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/mat_data_plot.py", line 107, in resizeEvent
    self.figure.tight_layout()
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1754, in tight_layout
    rect=rect)
  File "/usr/lib/python2.7/dist-packages/matplotlib/tight_layout.py", line 349, in get_tight_layout_figure
    pad=pad, h_pad=h_pad, w_pad=w_pad)
  File "/usr/lib/python2.7/dist-packages/matplotlib/tight_layout.py", line 128, in auto_adjust_subplotpars
    fig.transFigure.inverted())
  File "/usr/lib/python2.7/dist-packages/matplotlib/transforms.py", line 1775, in inverted
    self._inverted = Affine2D(inv(mtx), shorthand_name=shorthand_name)
  File "/usr/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 526, in inv
    ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
  File "/usr/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
    raise LinAlgError("Singular matrix")
numpy.linalg.linalg.LinAlgError: Singular matrix
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2020-03-28 09:29:21 -0600

kekebn gravatar image

Hey, I'm also a beginner and had the same problem. The problem was that my matplotlib was outdated or not installed (not sure honestly) following this: https://matplotlib.org/users/installi... was the solution. Hope it helps!

edit flag offensive delete link more

Comments

Thank you so much for mentioning. That solved my issue finally. .

svdeepak99 gravatar image svdeepak99  ( 2020-04-10 06:32:33 -0600 )edit

Worked for me too!

isaacasimov gravatar image isaacasimov  ( 2020-06-29 15:34:50 -0600 )edit
1

im still facing the error i actually executed the following command sudo apt-get install python3-matplotlib

hassaanaero gravatar image hassaanaero  ( 2021-01-04 09:19:53 -0600 )edit

Following the first few steps outlined in this question solved the problem for me: https://answers.ros.org/question/3569...

mdmedina gravatar image mdmedina  ( 2021-01-17 14:35:04 -0600 )edit
1

answered 2021-01-17 07:24:49 -0600

girayuzun gravatar image

I have solved like;

python -m pip install -U matplotlib
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2020-03-17 06:14:09 -0600

Seen: 2,989 times

Last updated: Jan 17