You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so i have following problem when i try to plot them this way:
In [107]:
seriesA=dfA["more"]
seriesB=dfB["less"]
In [108]:
plt.figure()
plt.plot(seriesA.index.tolist(),seriesA.tolist())
plt.plot(seriesB.index.tolist(),seriesB.tolist())
it's ok and both series have been plotted on same figure
but when i'll try this:
plt.figure()
seriesA.plot()
seriesB.plot()
it wrecks and i get following output
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-109-5054484e1e31> in <module>()
1 plt.figure()
2 seriesA.plot()
----> 3 seriesB.plot()
4
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\tools\plotting.pyc in plot_series(series, label, kind, use_index, rot, xticks, yticks, xlim, ylim, ax, style, grid, legend, logx, logy, secondary_y, **kwds)
2254 secondary_y=secondary_y, **kwds)
2255
-> 2256 plot_obj.generate()
2257 plot_obj.draw()
2258
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\tools\plotting.pyc in generate(self)
900 self._compute_plot_data()
901 self._setup_subplots()
--> 902 self._make_plot()
903 self._add_table()
904 self._make_legend()
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\tools\plotting.pyc in _make_plot(self)
1549 if self._is_ts_plot():
1550 data = self._maybe_convert_index(self.data)
-> 1551 self._make_ts_plot(data)
1552 else:
1553 from pandas.core.frame import DataFrame
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\tools\plotting.pyc in _make_ts_plot(self, data, **kwargs)
1646 y_values = self._get_stacked_values(y, label)
1647
-> 1648 newlines = plotf(y_values, ax, label, style, **kwds)
1649 self._add_legend_handle(newlines[0], label, index=i)
1650
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\tools\plotting.pyc in _plot(data, ax, label, style, **kwds)
1623 else:
1624 lines = tsplot(data, plotf, ax=ax, label=label,
-> 1625 style=style, **kwds)
1626 return lines
1627 return _plot
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\tseries\plotting.pyc in tsplot(series, plotf, **kwargs)
57 series = series.to_period(freq=freq)
58 freq, ax_freq, series = _maybe_resample(series, ax, freq, plotf,
---> 59 kwargs)
60
61 # Set ax with freq info
C:\winpy\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pandas\tseries\plotting.pyc in _maybe_resample(series, ax, freq, plotf, kwargs)
107 ax_freq = freq
108 else: # pragma: no cover
--> 109 raise ValueError('Incompatible frequency conversion')
110 return freq, ax_freq, series
111
ValueError: Incompatible frequency conversion
Which is extremely weird because before, i plotted similar but yet slightly different data and it plotted correctly.
further investigation revealed that there is a problem with index.inferred_freq which is being set to "100l" and it's done where my code calls df = df.set_index('column_name')
So i have two dataframes with simmilar data but, indexed by datetime64
dfA : http://pastebin.com/HenYJxdV
dfB : http://pastebin.com/qAsEqSxf
so i have following problem when i try to plot them this way:
it's ok and both series have been plotted on same figure
but when i'll try this:
it wrecks and i get following output
Which is extremely weird because before, i plotted similar but yet slightly different data and it plotted correctly.
P.S. pd.show_versions():
The text was updated successfully, but these errors were encountered: