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
When making minor changes to a time series (adding a second for example), the entire series is shifted to seemingly arbitrary positions. In the example code, one of the time series is shifted to around 2053.
Note that the only difference between the data for the first and the second plot is the time series. ts1 is used on the b data series in the first and ts2 is used on the b data series in the second.
And the only difference between the time series is the hour of the first and the last day. If I change either to 10 (as in ts1), the problem disappears. Adding a single second to the first timestamp also 'fixes' the problem.
This is a problem because it appears that using the twinx, for unclear reasons, fails with specific values for a datetime x-axis.
Uh oh!
There was an error while loading. Please reload this page.
Code Sample
Problem description
When making minor changes to a time series (adding a second for example), the entire series is shifted to seemingly arbitrary positions. In the example code, one of the time series is shifted to around 2053.
Note that the only difference between the data for the first and the second plot is the time series. ts1 is used on the b data series in the first and ts2 is used on the b data series in the second.
And the only difference between the time series is the hour of the first and the last day. If I change either to 10 (as in ts1), the problem disappears. Adding a single second to the first timestamp also 'fixes' the problem.
This is a problem because it appears that using the twinx, for unclear reasons, fails with specific values for a datetime x-axis.
See also: my question on stackoverflow
Expected Output
The expected output would be plots that share the x-axis and show the plots at the correct time index.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.3.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.21.0
pytest: None
pip: 9.0.1
setuptools: 38.2.3
Cython: None
numpy: 1.13.3
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.1.0
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: