Closed
Description
Pandas 0.8.1:
import pandas as pd
import matplotlib.pyplot as plt
rng_a = pd.date_range('1/1/2012', periods=4, freq='2H'')
rng_b = pd.date_range('1/1/2012', periods=4, freq='H')
rng_c = pd.date_range('1/1/2012', periods=4, freq='30T')
a = pd.Series([0, 1, 3, 6], rng_a)
b = pd.Series([0, 1, 3, 6], rng_b)
c = pd.Series([0, 1, 3, 6], rng_c)
a.plot()
b.plot() # works fine
c.plot() # ValueError: Incompatible frequency conversion
plt.show() # only a and b are plotted
b.plot() works fine, but c.plot() doesn't and returns the following error:
ValueError: Incompatible frequency conversion
When building the timeseries without specifying their frequency, no error is reported when trying to plot them, but there seems to be another issue occuring:
a = pd.Series([0, 1, 2, 3], ['1/1/2012 00:00:00', '1/1/2012 02:00:00', '1/1/2012 04:00:00', '1/1/2012 06:00:00'])
b = pd.Series([0, 1, 2, 3], ['1/1/2012 00:00:00', '1/1/2012 01:00:00', '1/1/2012 02:00:00', '1/1/2012 03:00:00'])
c = pd.Series([0, 1, 2, 3], ['1/1/2012 00:00:00', '1/1/2012 00:30:00', '1/1/2012 01:00:00', '1/1/2012 01:30:00'])
a.plot()
b.plot() # no error
c.plot() # no error
plt.show() # only c is plotted
No errors are reported, but only series c is plotted.