CellProfiler-Analyst icon indicating copy to clipboard operation
CellProfiler-Analyst copied to clipboard

Crashes when selecting scatter plot option from linear to log

Open daviddao opened this issue 8 years ago • 9 comments

On Mac OS X, when plotting a scatterplot using linear scale and then switching to log, the program crashes with:

screen shot 2015-12-11 at 3 48 02 pm

However, when doing the same thing in the vagrant environment (Ubuntu), I can plot and only get a warning. Also no error on Windows Vista.

DEBUG:root:[MainThread] PRAGMA table_info(per_image)
/usr/lib/python2.7/dist-packages/numpy/ma/core.py:3847: UserWarning: Warning: converting a masked element to nan.
# Here the Mac version crashes!
warnings.warn("Warning: converting a masked element to nan.")
DEBUG:root:Scatter: Plotted 384 points in 0.024 seconds.

daviddao avatar Dec 11 '15 20:12 daviddao

I get this error on Windows 7 as well running matplotlib 1.5.1:

 File "C:\Trunk\cellProfiler-analyst\CellProfiler-Analyst.py", line 531, in <module>
  app.MainLoop()
File "C:\Python27\Lib\site-packages\wx-3.0-msw\wx\_core.py", line 8657, in MainLoop
  wx.PyApp.MainLoop(self)
File "C:\Python27\Lib\site-packages\wx-3.0-msw\wx\_core.py", line 7952, in MainLoop
  return _core_.PyApp_MainLoop(*args, **kwargs)
 File "C:\Trunk\cellProfiler-analyst\cpa\scatter.py", line 279, in update_figpanel
  self.update_gate_helper()
 File "C:\Trunk\cellProfiler-analyst\cpa\scatter.py", line 222, in update_gate_helper
  self.figpanel.gate_helper.disable()
 File "C:\Trunk\cellProfiler-analyst\cpa\gating.py", line 64, in disable
  self.canvas.draw()
File "C:\Python27\Lib\site-packages\matplotlib\backends\backend_wxagg.py", line 51, in draw
  FigureCanvasAgg.draw(self)
File "C:\Python27\Lib\site-packages\matplotlib\backends\backend_agg.py", line 474, in draw
  self.figure.draw(self.renderer)
File "C:\Python27\Lib\site-packages\matplotlib\artist.py", line 61, in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File "C:\Python27\Lib\site-packages\matplotlib\figure.py", line 1159, in draw
  func(*args)
File "C:\Python27\Lib\site-packages\matplotlib\artist.py", line 61, in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File "C:\Python27\Lib\site-packages\matplotlib\axes\_base.py", line 2324, in draw
  a.draw(renderer)
File "C:\Python27\Lib\site-packages\matplotlib\artist.py", line 61, in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File "C:\Python27\Lib\site-packages\matplotlib\axis.py", line 1120, in draw
  self.label.draw(renderer)
File "C:\Python27\Lib\site-packages\matplotlib\artist.py", line 61, in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File "C:\Python27\Lib\site-packages\matplotlib\text.py", line 757, in draw
  raise ValueError("posx and posy should be finite values")

ValueError: posx and posy should be finite values

braymp avatar Jan 11 '16 21:01 braymp

Yes, I encountered the same issue on MacOS. Strangely enough, it seems like the order of plotting matters. When one plots log scale first, it doesn't crash for the initial example screen shot 2016-01-11 at 4 50 02 pm .

daviddao avatar Jan 11 '16 21:01 daviddao

Somehow fixed in the latest version e4a0352 after upgrading numpy version to 1.10.4. @braymp can you test it again?

daviddao avatar Jan 21 '16 16:01 daviddao

Re 1.10 - some things that were previously deprecated now have different behaviors or fail. Most notably:

import numpy as np
x = np.zeros(5, np.float64)
y = np.zeros(5, np.int32)
y += x

Just be on the lookout for the Numpy 1.10 upgrade to not be so smooth. The h5py package was not compatible if I remember correctly (maybe it is now though).

LeeKamentsky avatar Jan 21 '16 16:01 LeeKamentsky

I still get the same error, even with numpy 1.10.4, using dff0b3b7548d65788f399c405f577d3d792529db

braymp avatar Jan 22 '16 19:01 braymp

Thanks, I will dig deeper into this issue.

daviddao avatar Jan 22 '16 19:01 daviddao

Any updates on this error?

jamiis avatar Apr 08 '16 17:04 jamiis

@jamiis Are you still getting this error? What version are you using?

jhung0 avatar Apr 08 '16 17:04 jhung0

This error is definitely still active.

bethac07 avatar Sep 28 '17 20:09 bethac07