ros 运行rqt_plot报错、无法绘图、红字、matplotlib版本过低

1.指令后的错误信息

/usr/lib/python2.7/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
/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()

ros 运行rqt_plot报错、无法绘图、红字、matplotlib版本过低_第1张图片

2.个人解决方法(先安装pip)

安装pip:pip为python的包管理工具

参考链接:https://www.runoob.com/w3cnote/python-pip-install-usage.html

以下图片均转自该网站。如有侵权请联系。

ros 运行rqt_plot报错、无法绘图、红字、matplotlib版本过低_第2张图片

ros 运行rqt_plot报错、无法绘图、红字、matplotlib版本过低_第3张图片

3.升级matplotlib

$ pip show matplotlib

查看matplotlib版本,

然后升级,

$ pip install --upgrade matplotlib

升级完后运行,plot

$ rqt_plot

然后可以对数据进行绘图了。

ros 运行rqt_plot报错、无法绘图、红字、matplotlib版本过低_第4张图片

你可能感兴趣的:(笔记,ROS学习常见报错,pip,linux)