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

"ValueError: bottom cannot be >= top" when attempting to achieve a vertical configuration #34

Closed
EliteMasterEric opened this issue Aug 23, 2019 · 2 comments

Comments

@EliteMasterEric
Copy link

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 1756, in tight_layout
    self.subplots_adjust(**kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1612, in subplots_adjust
    self.subplotpars.update(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 230, in update
    raise ValueError('bottom cannot be >= top')
ValueError: bottom cannot be >= top

This crash can still be reliably reproduced on both kinetic and melodic.

  1. Open an RQT window.
  2. Create two plots in that window.
  3. Attempt to stack one plot vertically below the other, as pictured below.
  4. RQT will crash with the above stack trace.

Screenshot from 2019-08-23 12-17-16

The issue has been posted previously in ros-visualization/rqt#110. This issue appears to be related to font sizes when using tight_layout, as seen in matplotlib/matplotlib#5456, but 5456 has now been closed and the issue is not resolved in rqt_plot.

@EliteMasterEric EliteMasterEric changed the title "ValueError: bottom cannot be >= top" when attempting to achieve a certain configuration "ValueError: bottom cannot be >= top" when attempting to achieve a vertical configuration Aug 23, 2019
@dirk-thomas
Copy link
Contributor

I moved the ticket from rqt to this repo: #35.

Since this is a duplicate I will go ahead and close it. Please comment on the existing ticket with any new information.

As far as I can see the upstream ticket hasn't committed / released any fix. The latest comment states that the error message should be different. Please make sure to try it with the latest state of matplotlib and share your result.

@mwwoodm
Copy link

mwwoodm commented Jan 2, 2021

As dirk-thomas notes, this was solved for me in #35 by upgrading matplotlib:
sudo pip install --upgrade matplotlib

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

No branches or pull requests

3 participants