Created
October 18, 2019 14:17
-
-
Save raphaeldussin/49f00a3bd9214d93acb2b8e87411dca5 to your computer and use it in GitHub Desktop.
set time axis with cftime
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
| pic_start = cftime.num2date(0, 'days since 0001-01-01') | |
| pic_end = cftime.num2date(1200*365.25, 'days since 0001-01-01') | |
| plt.figure(figsize=[8,6]) | |
| ax1 = plt.subplot(211) | |
| plt.plot(ds_nadw_CM4_piC['time'], ds_nadw_CM4_piC['vol_nadw_atl'], 'k') | |
| ax1.set_xlim([pic_start, pic_end]) | |
| ax2 = plt.subplot(212) | |
| plt.plot(ds_nadw_CESM2_piC['time'], ds_nadw_CESM2_piC['vol_nadw_atl'], 'r') | |
| ax2.set_xlim([pic_start, pic_end]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment