naojsoft / qplan

Other
2 stars 4 forks source link

Graphs disappear when resizing window #3

Closed ejeschke closed 5 years ago

ejeschke commented 7 years ago

After scheduling, the graphs appear in the lower panes, but if the window is resized, some of the panes go blank. The error in the log looks like:

TypeError: object of type 'itertools.imap' has no len()
Traceback (most recent call last):
  File "/gen2/share/arch/ubuntu14/lib/python2.7/site-packages/ginga-2.6.2.dev1303-py2.7.egg/ginga/qtw/Plot.py", line 44, in resize_event
    self.widget._resizeEvent(event)
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_qt4.py", line 299, in resizeEvent
    self.draw()
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_qt4agg.py", line 154, in draw
    FigureCanvasAgg.draw(self)
  File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line 451, in draw
    self.figure.draw(self.renderer)
  File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1034, in draw
    func(*args)
  File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 2086, in draw
    a.draw(renderer)
  File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1091, in draw
    ticks_to_draw = self._update_ticks(renderer)
  File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 945, in _update_ticks
    tick_tups = [t for t in self.iter_ticks()]
  File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 893, in iter_ticks
    for i, val in enumerate(majorLocs)]
  File "/usr/lib/pymodules/python2.7/matplotlib/ticker.py", line 263, in __call__
    if pos is None or pos >= len(self.seq):
ejeschke commented 7 years ago

Ping @monodera. I was able to reproduce this on my desktop, so that's good.

ejeschke commented 7 years ago

Interestingly, if the plots disappear, and I simply adjust the subset plotted spinbox, the airmass plot is replotted and reappears.

ejeschke commented 7 years ago

This issue is fixed in commit ff69c5aeb289a285245b9117074642dabb934b1b.