-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_comparisons.py
More file actions
executable file
·35 lines (29 loc) · 969 Bytes
/
Copy pathplot_comparisons.py
File metadata and controls
executable file
·35 lines (29 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 13 16:38:59 2018
@author: siirias
"""
import datetime as dt
import calendar
import matplotlib as mp
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from smartseahelper import smh
ss=smh()
colors=['r','g','b','m']
datadir=ss.root_data_out+"/derived_data/"
sets=['A001','B001','C001']
fig1=plt.figure(figsize=(6,6))
fig2=plt.figure(figsize=(16,6))
for i,the_set in zip(range(len(sets)),sets):
yearly_data=pd.read_csv(datadir+'yearly_max_ice_{}.csv'.format(the_set))
full_data=pd.read_csv(datadir+'ice_extent_{}.csv'.format(the_set),parse_dates=['time'])
plt.figure(fig1.number)
plt.plot(yearly_data['year'],yearly_data['max_ice'],colors[i],label=the_set)
plt.figure(fig2.number)
plt.plot(full_data['time'],full_data['ice_extent'],colors[i],label=the_set)
plt.legend()
plt.figure(fig1.number)
plt.legend()