File:First marriage Ages in Japan.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 900 × 720 pixels, file size: 293 KB)

Captions

Captions

First marriage Ages in Japan
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: First marriage Ages in Japan
Date
Source Own work, Data from MHLW Vital Statistics
https://www.mhlw.go.jp/toukei/list/81-1.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
from cycler import cycler
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker

plt.rcParams["axes.prop_cycle"] = plt.cycler("color", plt.get_cmap("tab20")(np.linspace(0,1,12)))
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Noto Sans Display']
fig, ax = plt.subplots(ncols=2, figsize=(10,8) )
plt.subplots_adjust(left=0.02, bottom=0.12, right=0.98, top=0.93)

# Men
df = pd.read_csv("data.tsv", index_col=0 , sep = "\t")
df1 = df.drop('Total', axis=1).T.div(1000)
df2 = df.T.loc['Total']
for i in range( len(df1) ):
	ax[0].barh(df1.columns, df1.iloc[i] ,  height=0.8, label='Man' ,left=df1.iloc[:i].sum())
ax[0].yaxis.tick_right()
ax[0].set_xlim([850,0])
ax[0].set_ylim([1945,2022])
ax[0].xaxis.set_major_locator(ticker.MultipleLocator(50))
ax[0].yaxis.set_major_locator(ticker.MultipleLocator(2))
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[0].set_xlabel('Husband 1000 person',loc="left")

#Women
df3 = pd.read_csv("data2.tsv", index_col=0 , sep = "\t")
df4 = df3.drop('Total', axis=1).T.div(1000)

for i in range( len(df4) ):
	ax[1].barh(df4.columns, df4.iloc[i] ,  height=0.8, label='Woman' ,left=df4.iloc[:i].sum())
ax[1].set_xlim([0,850])
ax[1].set_ylim([1945,2022])
ax[1].xaxis.set_major_locator(ticker.MultipleLocator(50))
ax[1].yaxis.set_major_locator(ticker.MultipleLocator(2))
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].set_xlabel('Wife 1000 person',loc="right")

plt.suptitle("First marriage Ages in Japan (MHLW)", fontsize=18)
fig.legend(df1.index, facecolor="#eeeeee" , ncol=10, loc='lower center', fontsize=9)

plt.savefig("image.svg")

File history

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

Date/TimeThumbnailDimensionsUserComment
current13:19, 18 February 2023Thumbnail for version as of 13:19, 18 February 2023900 × 720 (293 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