---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-12-b4ef90ad9309> in <module>()
----> 1 myModelator.patch_clamp_plots(bestSim,show=True, path=path)
/Users/gopalsarma/git/openworm_base/ChannelWorm/channelworm/fitter/modelators.pyc in patch_clamp_plots(self, simData, show, path)
38 plt.xlabel("Time (ms)")
39 plt.ylabel("Current (pA)")
---> 40 plt.savefig(path+"current_time.png",bbox_inches='tight',format='png')
41 pickle.dump(it, file(path+"current_time.pickle", 'w'))
42 if show:
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/pyplot.pyc in savefig(*args, **kwargs)
708 def savefig(*args, **kwargs):
709 fig = gcf()
--> 710 res = fig.savefig(*args, **kwargs)
711 fig.canvas.draw_idle() # need this if 'transparent=True' to reset colors
712 return res
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/figure.pyc in savefig(self, fname, **kwargs)
2033 self.set_frameon(frameon)
2034
-> 2035 self.canvas.print_figure(fname, **kwargs)
2036
2037 if frameon:
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
2210 orientation=orientation,
2211 dryrun=True,
-> 2212 **kwargs)
2213 renderer = self.figure._cachedRenderer
2214 bbox_inches = self.figure.get_tightbbox(renderer)
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in print_png(self, filename_or_obj, *args, **kwargs)
511
512 def print_png(self, filename_or_obj, *args, **kwargs):
--> 513 FigureCanvasAgg.draw(self)
514 renderer = self.get_renderer()
515 original_dpi = renderer.dpi
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in draw(self)
431 # if toolbar:
432 # toolbar.set_cursor(cursors.WAIT)
--> 433 self.figure.draw(self.renderer)
434 # A GUI class may be need to update a window using this draw, so
435 # don't forget to call the superclass.
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
53 renderer.start_filter()
54
---> 55 return draw(artist, renderer, *args, **kwargs)
56 finally:
57 if artist.get_agg_filter() is not None:
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/figure.pyc in draw(self, renderer)
1473
1474 mimage._draw_list_compositing_images(
-> 1475 renderer, self, artists, self.suppressComposite)
1476
1477 renderer.close_group('figure')
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/image.pyc in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
139 if not_composite or not has_images:
140 for a in artists:
--> 141 a.draw(renderer)
142 else:
143 # Composite any adjacent images together
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
53 renderer.start_filter()
54
---> 55 return draw(artist, renderer, *args, **kwargs)
56 finally:
57 if artist.get_agg_filter() is not None:
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in draw(self, renderer, inframe)
2605 renderer.stop_rasterizing()
2606
-> 2607 mimage._draw_list_compositing_images(renderer, self, artists)
2608
2609 renderer.close_group('axes')
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/image.pyc in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
139 if not_composite or not has_images:
140 for a in artists:
--> 141 a.draw(renderer)
142 else:
143 # Composite any adjacent images together
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
53 renderer.start_filter()
54
---> 55 return draw(artist, renderer, *args, **kwargs)
56 finally:
57 if artist.get_agg_filter() is not None:
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/lines.pyc in draw(self, renderer)
759 self._set_gc_clip(gc)
760
--> 761 ln_color_rgba = self._get_rgba_ln_color()
762 gc.set_foreground(ln_color_rgba, isRGBA=True)
763 gc.set_alpha(ln_color_rgba[3])
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/lines.pyc in _get_rgba_ln_color(self, alt)
1260
1261 def _get_rgba_ln_color(self, alt=False):
-> 1262 return mcolors.to_rgba(self._color, self._alpha)
1263
1264 # some aliases....
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/colors.pyc in to_rgba(c, alpha)
166 rgba = _colors_full_map.cache[c, alpha]
167 except (KeyError, TypeError): # Not in cache, or unhashable.
--> 168 rgba = _to_rgba_no_colorcycle(c, alpha)
169 try:
170 _colors_full_map.cache[c, alpha] = rgba
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/colors.pyc in _to_rgba_no_colorcycle(c, alpha)
217 # float)` and `np.array(...).astype(float)` all convert "0.5" to 0.5.
218 # Test dimensionality to reject single floats.
--> 219 raise ValueError("Invalid RGBA argument: {!r}".format(orig_c))
220 # Return a tuple to prevent the cached value from being modified.
221 c = tuple(c.astype(float))
ValueError: Invalid RGBA argument: array([[0.28719157],
[0.40084588],
[0.6514793 ]])
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/IPython/core/formatters.pyc in __call__(self, obj)
332 pass
333 else:
--> 334 return printer(obj)
335 # Finally look for special method names
336 method = get_real_method(obj, self.print_method)
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in <lambda>(fig)
245
246 if 'png' in formats:
--> 247 png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
248 if 'retina' in formats or 'png2x' in formats:
249 png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in print_figure(fig, fmt, bbox_inches, **kwargs)
129
130 bytes_io = BytesIO()
--> 131 fig.canvas.print_figure(bytes_io, **kw)
132 data = bytes_io.getvalue()
133 if fmt == 'svg':
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
2210 orientation=orientation,
2211 dryrun=True,
-> 2212 **kwargs)
2213 renderer = self.figure._cachedRenderer
2214 bbox_inches = self.figure.get_tightbbox(renderer)
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in print_png(self, filename_or_obj, *args, **kwargs)
511
512 def print_png(self, filename_or_obj, *args, **kwargs):
--> 513 FigureCanvasAgg.draw(self)
514 renderer = self.get_renderer()
515 original_dpi = renderer.dpi
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in draw(self)
431 # if toolbar:
432 # toolbar.set_cursor(cursors.WAIT)
--> 433 self.figure.draw(self.renderer)
434 # A GUI class may be need to update a window using this draw, so
435 # don't forget to call the superclass.
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
53 renderer.start_filter()
54
---> 55 return draw(artist, renderer, *args, **kwargs)
56 finally:
57 if artist.get_agg_filter() is not None:
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/figure.pyc in draw(self, renderer)
1473
1474 mimage._draw_list_compositing_images(
-> 1475 renderer, self, artists, self.suppressComposite)
1476
1477 renderer.close_group('figure')
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/image.pyc in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
139 if not_composite or not has_images:
140 for a in artists:
--> 141 a.draw(renderer)
142 else:
143 # Composite any adjacent images together
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
53 renderer.start_filter()
54
---> 55 return draw(artist, renderer, *args, **kwargs)
56 finally:
57 if artist.get_agg_filter() is not None:
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in draw(self, renderer, inframe)
2605 renderer.stop_rasterizing()
2606
-> 2607 mimage._draw_list_compositing_images(renderer, self, artists)
2608
2609 renderer.close_group('axes')
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/image.pyc in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
139 if not_composite or not has_images:
140 for a in artists:
--> 141 a.draw(renderer)
142 else:
143 # Composite any adjacent images together
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)
53 renderer.start_filter()
54
---> 55 return draw(artist, renderer, *args, **kwargs)
56 finally:
57 if artist.get_agg_filter() is not None:
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/lines.pyc in draw(self, renderer)
759 self._set_gc_clip(gc)
760
--> 761 ln_color_rgba = self._get_rgba_ln_color()
762 gc.set_foreground(ln_color_rgba, isRGBA=True)
763 gc.set_alpha(ln_color_rgba[3])
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/lines.pyc in _get_rgba_ln_color(self, alt)
1260
1261 def _get_rgba_ln_color(self, alt=False):
-> 1262 return mcolors.to_rgba(self._color, self._alpha)
1263
1264 # some aliases....
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/colors.pyc in to_rgba(c, alpha)
166 rgba = _colors_full_map.cache[c, alpha]
167 except (KeyError, TypeError): # Not in cache, or unhashable.
--> 168 rgba = _to_rgba_no_colorcycle(c, alpha)
169 try:
170 _colors_full_map.cache[c, alpha] = rgba
/Users/gopalsarma/anaconda/envs/py35/lib/python2.7/site-packages/matplotlib/colors.pyc in _to_rgba_no_colorcycle(c, alpha)
217 # float)` and `np.array(...).astype(float)` all convert "0.5" to 0.5.
218 # Test dimensionality to reject single floats.
--> 219 raise ValueError("Invalid RGBA argument: {!r}".format(orig_c))
220 # Return a tuple to prevent the cached value from being modified.
221 c = tuple(c.astype(float))
ValueError: Invalid RGBA argument: array([[0.28719157],
[0.40084588],
[0.6514793 ]])
<Figure size 432x288 with 1 Axes>