Last active
September 11, 2015 09:02
-
-
Save stefan789/464f04a2ffd754b70e29 to your computer and use it in GitHub Desktop.
Plot db data with timezones
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fig, ax = plt.subplots() | |
fig.set_size_inches(8,6) | |
fmt = mdates.DateFormatter("%H:%M", tz=berlin) | |
ax.xaxis.set_major_formatter(fmt) | |
ax.plot_date([i.astimezone(berlin) for i in data["Date"]], data["Bz1"], "-", label="y1") | |
fig.autofmt_xdate() | |
#ax.set_xlim([dt.datetime(2015,8,7,17,0,0), dt.datetime(2015,8,7,19,0,0)]) | |
#ax.set_ylim([-30,40]) | |
plt.legend(loc='center right', | |
bbox_to_anchor=(1.16,0.5)) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment