-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
plot_date() ignores timezone #5575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Might be a dupe of #5543. |
Fixing #5543 is a prerequisite to fixing this bug however there still exists another bug. In matplotlib/axis.py update_units is called 3 times. First from _base.py:_xy_from_xy where the single parameter passed in is the time_index above. This sets Axis.units to 'Europe/Berlin'. The second time is on the y-axis, ignore this one. The third time is from the plot_date which calls xaxis_date. Since Axis.units was already set to 'Europe/Berlin', it will not be set to the 'UTC' which was passed in. Calling self.set_units(default) regardless of whether or not Axis.units is None fixes the issue above but probably isn't the most efficient. I will continue reading through the code but I don't know it well enough yet to make a proper fix. As for why there is also a dependency on #5543, making the above fix will fix it for the example above. However, a subsequent call to plot_date using tz='US/Eastern' will still plot in UTC. |
FIX: plot_date ignores timezone Closes #5575 Conflicts: lib/matplotlib/tests/test_axes.py multiple PRs added tests at same location in file keep all.
FIX: plot_date ignores timezone Closes matplotlib#5575 Conflicts: lib/matplotlib/tests/test_axes.py multiple PRs added tests at same location in file keep all.
Hi, I just upgraded to 1.5.3 and I still see the same behavior as originaly described by timtroendle |
@pjadzinsky can you make a new issue for this? |
Using matplotlib 1.5.0, I am doing the following:
The two
plot_date
calls yield the same plot, hence it seemsplot_date()
ignores thetz
argument. This had been reported and fixed in #193, but for me it doesn't seem to work.The text was updated successfully, but these errors were encountered: