File:Life expectancy in Japan by Prefecture.svg

Original file(SVG file, nominally 450 × 720 pixels, file size: 192 KB)

Captions

Captions

Life expectancy in Japan 2020, by Prefecture
This file may be updated to reflect new information.
If you wish to use a specific version of the file without new updates being mirrored, please upload the required version as a separate file.

Summary

edit
Description
English: Life expectancy in Japan 2020, by Prefecture
Date
Source Own work, Data from MHLW
https://www.mhlw.go.jp/toukei/saikin/hw/life/tdfk20/index.html
Author Yuasan
Permission
(Reusing this file)
CC-0

Licensing

edit
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

graph data

edit
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker

df = pd.read_csv("data.tsv", index_col=0 , sep = "\t")
df = df.sort_values(by=["Women"], ascending=True)

fig, ax = plt.subplots(ncols=2, figsize=(5,8) )
plt.subplots_adjust(left=0.03, bottom=0.1, right=0.97, top=0.95, wspace=0.25)

plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Noto Sans JP']

ax[0].barh(df.index, df['Men'], color='#ADD1E9', height=0.8, label='Man')
ax[0].yaxis.tick_right()
ax[0].set_xlim([90,76])
ax[0].xaxis.set_major_locator(ticker.MultipleLocator(2))
ax[1].xaxis.set_minor_locator(ticker.MultipleLocator(1))
ax[0].tick_params(axis='x', labelsize=8, rotation=15)
ax[0].tick_params(axis='y', labelsize=8)
ax[0].set_axisbelow(True)
ax[0].grid(True, which='major',color='#eeeeee',linestyle='-', axis="x")

ax[1].barh(df.index, df['Women'], color='#EED4D4', height=0.8, label='Woman')
ax[1].set_xlim([76,90])
ax[1].xaxis.set_major_locator(ticker.MultipleLocator(2))
ax[1].xaxis.set_minor_locator(ticker.MultipleLocator(1))
ax[1].tick_params(axis='x', labelsize=8, rotation=15)
ax[1].tick_params(axis='y', labelsize=8)
ax[1].set_axisbelow(True)
ax[1].grid(True, which='major',color='#eeeeee',linestyle='-', axis="x")
ax[1].axes.yaxis.set_ticklabels([])

ax[1].set_xlabel('Age',loc="right")
plt.suptitle("Life expectancy in Japan 2020, by Prefecture (MHLW)", fontsize=13)

plt.grid(which='major',color='#eeeeee',linestyle='-', axis="x", zorder=-1)
plt.grid(which='minor',color='#f3f3f3',linestyle='-', axis="x", zorder=-1)

fig.legend( facecolor="#eeeeee" , ncol=2, loc='lower center')

plt.savefig("image.svg")

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current17:04, 30 June 2023Thumbnail for version as of 17:04, 30 June 2023450 × 720 (192 KB)Yuasan (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata