概要
Graph data
import matplotlib.pyplot as plt
from cycler import cycler
import pandas as pd
df = pd.read_csv("productivity.tsv", index_col=0 , sep = "\t")
df = df.T
df = df.fillna(method = 'ffill')
df2 = pd.read_csv("wage.tsv", index_col=0 , sep = "\t")
df2 = df2.T
df2 = df2.fillna(method = 'ffill')
fig, ax = plt.subplots(figsize=(12, 8))
ax2 = ax.twinx()
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Noto Sans Display']
plt.subplots_adjust(left=0.07, bottom=0.15, right=0.90, top=0.93)
ax.set_prop_cycle( plt.rcParams['axes.prop_cycle'] )
ax.plot(df, linewidth=1, linestyle="dashed")
ax2.plot(df2, linewidth=2)
ax.legend(df.columns, fontsize=9, ncol=10, loc='center' ,bbox_to_anchor=(-0.2, -0.15, 1., .102) )
ax2.legend(df.columns, fontsize=9, ncol=10, loc='center' ,bbox_to_anchor=(0.2, -0.20, 1., .102) )
ax.set_axisbelow(True)
ax.set_ylabel("GDP per hour worked (PPPUSD) - Dotted line", fontsize=8)
ax2.set_ylabel("Average wages (PPPUSD) - Solid line", fontsize=8)
plt.title("Average wages and GDP per hour worked in G7 countries (OECD stats)", fontsize=16)
plt.tick_params(labelsize=9, pad=4)
for tick in ax.get_xticklabels():
tick.set_rotation(35)
tick.set_fontsize(8)
plt.grid(which='major',color='#cccccc',linestyle='-', axis="y")
plt.savefig("image.svg")
ライセンス
この作品の著作権者である私は、この作品を以下のライセンスで提供します。
|
このファイルはクリエイティブ・コモンズ CC0 1.0 全世界 パブリック・ドメイン提供のもとで利用可能にされています。
|
ある作品に本コモンズ証を関連づけた者は、その作品について世界全地域において著作権法上認められる、その者が持つすべての権利(その作品に関する権利や隣接する権利を含む。)を、法令上認められる最大限の範囲で放棄して、パブリック・ドメインに提供しています。
この作品は、たとえ営利目的であっても、許可を得ずに複製、改変・翻案、配布、上演・演奏することが出来ます。
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse
|
Average wages and GDP per hour worked in G7 countries