On 02.12.2014 16:34, Benjamin Root wrote:
Please provide the full traceback
sure, I pasted the traceback below. Here are the pandas infos:
In [17]: df.info()
<class ‘pandas.core.frame.DataFrame’>
DatetimeIndex: 5 entries, 1950-01-01 00:00:00 to 1950-05-01 00:00:00
Freq: MS
Data columns (total 2 columns):
data 5 non-null int64
cond 5 non-null bool
dtypes: bool(1), int64(1)
memory usage: 85.0 bytes
In [18]: df.index
Out[18]:
<class ‘pandas.tseries.index.DatetimeIndex’>
[1950-01-01, …, 1950-05-01]
Length: 5, Freq: MS, Timezone: None
In [19]: df.index.values
Out[19]:
array([‘1950-01-01T00:00:00.000000000Z’, ‘1950-02-01T00:00:00.000000000Z’,
'1950-03-01T00:00:00.000000000Z', '1950-04-01T00:00:00.000000000Z',
'1950-05-01T00:00:00.000000000Z'], dtype='datetime64[ns]')
Traceback:
In [16]: c = span_where(df.index, ymin=0, ymax=4, where=df[‘cond’],
color=‘green’)
TypeError Traceback (most recent call last)
in ()
----> 1 c = span_where(df.index, ymin=0, ymax=4, where=df[‘cond’],
color=‘green’)
/home/mowglie/.pyvirtualenvs/py3.3/lib/python3.3/site-packages/matplotlib/collections.py
in span_where(x, ymin, ymax, where, **kwargs)
871
872 collection = BrokenBarHCollection(
→ 873 xranges, [ymin, ymax - ymin], **kwargs)
874 return collection
875
/home/mowglie/.pyvirtualenvs/py3.3/lib/python3.3/site-packages/matplotlib/collections.py
in init(self, xranges, yrange, **kwargs)
851 (xmin + xwidth, ymin),
852 (xmin, ymin)] for xmin, xwidth in xranges]
→ 853 PolyCollection.init(self, verts, **kwargs)
854
855 @...4603...
/home/mowglie/.pyvirtualenvs/py3.3/lib/python3.3/site-packages/matplotlib/collections.py
in init(self, verts, sizes, closed, **kwargs)
799 Collection.__init__(self, **kwargs)
800 self.set_sizes(sizes)
→ 801 self.set_verts(verts, closed)
802
803 def set_verts(self, verts, closed=True):
/home/mowglie/.pyvirtualenvs/py3.3/lib/python3.3/site-packages/matplotlib/collections.py
in set_verts(self, verts, closed)
819 codes[0] = mpath.Path.MOVETO
820 codes[-1] = mpath.Path.CLOSEPOLY
→ 821 self._paths.append(mpath.Path(xy, codes))
822 else:
823 self._paths.append(mpath.Path(xy))
/home/mowglie/.pyvirtualenvs/py3.3/lib/python3.3/site-packages/matplotlib/path.py
in init(self, vertices, codes, _interpolation_steps, closed, readonly)
135 vertices = vertices.astype(np.float_).filled(np.nan)
136 else:
→ 137 vertices = np.asarray(vertices, np.float_)
138
139 if codes is not None:
/home/mowglie/.pyvirtualenvs/py3.3/lib/python3.3/site-packages/numpy/core/numeric.py
in asarray(a, dtype, order)
460
461 """
→ 462 return array(a, dtype, copy=False, order=order)
463
464 def asanyarray(a, dtype=None, order=None):
TypeError: float() argument must be a string or a number
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users