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
However, I agree that just using Matplotlib does not give optimal results either:
from matplotlib.colors import Normalize
import matplotlib.pyplot as plt
import numpy as np
times = (np.array([5, 7, 15, 23, 68], dtype='timedelta64[ns]') +
np.datetime64('2022-07-26T04:50:20', 'ns'))
fig, ax = plt.subplots()
ax.plot(times, np.array([5, 7, 15, 23, 68]))
plt.show()
I think there have been attempts to fix this in the past, but it usually bumps up against the fact that nano-seconds are probably best plotted as deltas from a starting time.
Bug summary
When plotting time-series data from a high-frequency data source, the plot looks distorted when the values are plotted against a nanosecond timestamp.
I am working in PyCharm 2021.2.2 Community Edition, without Jupiter notebook
Code for reproduction
Actual outcome
Plot result of
data['values'].values
Plot result of
data['values']
Expected outcome
I would expect the plot result to lookalike "good plot", but with time-scaled x-Axis
Additional information
No response
Operating system
MacOS 12.4 (Monterey)
Matplotlib Version
3.5.2
Matplotlib Backend
MacOSX
Python version
3.9.13
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: