In [1]:
import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')
get_ipython().magic('pylab inline')
In [2]:
# Cartelle Input/Output
dir_df = os.path.join(os.path.abspath(''),'stg')
dir_out = os.path.join(os.path.abspath(''),'output')
In [3]:
df_g8_filename = r'df_g8.pkl'
df_g8_fullpath = os.path.join(dir_df, df_g8_filename)
df_g8 = pd.read_pickle(df_g8_fullpath)
In [4]:
df_g8.head(5)
Out[4]:
In [5]:
tp = df_g8.plot(kind='line',
legend = True)
tp.set_xlabel("")
tp.set_ylabel("Tasso di disoccupazione")
plt.xticks(rotation=45)
fig_posts = tp.get_figure()
fig_posts.tight_layout()
fig_posts.savefig(os.path.join(dir_out,'G8_Disoccupazione.png'), format='png', dpi=1000)