File:Population of Japan by generation.svg

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

Original file(SVG file, nominally 630 × 540 pixels, file size: 125 KB)

Captions

Captions

Population of Japan by generation
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: Population of Japan by generation
Date
Source Own work, Data from Japan Population Estimates , (e-stat)
https://www.e-stat.go.jp/en/stat-search/files?page=1&toukei=00200524&tstat=000000090001
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.div(10)

fig, ax = plt.subplots(ncols=2, figsize=(7,6) )
plt.subplots_adjust(left=0.02, bottom=0.1, right=0.98, top=0.93)

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

# Men
ax[0].barh(df.index, df['Men'], color='#ADD1E9', height=0.8, label='Men')
ax[0].yaxis.tick_right()
ax[1].yaxis.set_major_locator(ticker.MultipleLocator(5))
ax[0].set_xlim([130,0])
ax[0].xaxis.set_major_locator(ticker.MultipleLocator(10))
ax[0].yaxis.set_major_locator(ticker.MultipleLocator(5))
ax[0].tick_params(axis='x', labelsize=8, rotation=15)
ax[0].axes.yaxis.set_ticklabels([])
ax[0].set_axisbelow(True)
ax[0].grid(True, which='major',color='#eeeeee',linestyle='-', axis="x")
ax[0].margins(0)

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

#age / year
for i in df.index:
	if i % 5 == 0 :
		ax[0].text(-2.5, i-0.5, i ,fontsize=8)
		ax[1].text(-15, i-0.5, "/ %d"%(2022-i) ,fontsize=8)

#Post-war	1939-1945
ax[0].axhspan(77,83, color="#eaeaea",zorder=-1)	
ax[1].axhspan(77,83, color="#eaeaea",zorder=-1)	
ax[0].annotate("Post-war", (120, 80) ,color="#DD1F30") 

#dankai 1947-1950
ax[0].axhspan(73,76, color="#FFFD8C",zorder=-1)	
ax[1].axhspan(73,76, color="#FFFD8C",zorder=-1)	
ax[0].annotate("Dankai", (129, 73) ,color="#DD1F30") 

#danso 1951-1960
ax[0].axhspan(62,71, color="#efffb7",zorder=-1)	
ax[1].axhspan(62,71, color="#efffb7",zorder=-1)	
ax[0].annotate("Danso", (120, 65) ,color="#DD1F30") 

ax[0].annotate("Shin-Jinrui", (120, 57) ,color="#DD1F30") 

# dankai-jr  1971-1974
ax[0].axhspan(49,52, color="#FFFD8C",zorder=-1)	
ax[1].axhspan(49,52, color="#FFFD8C",zorder=-1)	
ax[0].annotate("Dankai Jr.", (129, 50) ,color="#DD1F30") 

# post-dankai-jr  1975-1981
ax[0].axhspan(42,48, color="#efffb7",zorder=-1)	
ax[1].axhspan(42,48, color="#efffb7",zorder=-1)	
ax[0].annotate("Post Dankai Jr.", (129, 43) ,color="#DD1F30") 

# danso Jr 1976-1985
ax[0].annotate("Post Danso Jr.", (120, 38) ,color="#DD1F30") 

# shinjinrui Jr 1986-1995
ax[0].axhspan(27,36, color="#FFFD8C",zorder=-1)	
ax[1].axhspan(27,36, color="#FFFD8C",zorder=-1)	
ax[0].annotate("Shin-Jinrui Jr.", (120, 30) ,color="#DD1F30") 


ax[1].set_xlabel('10,000 person',loc="right")
plt.suptitle("Population of Japan by generation (2022-10)", fontsize=14)

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
current13:41, 21 July 2023Thumbnail for version as of 13:41, 21 July 2023630 × 540 (125 KB)Yuasan (talk | contribs)add gens
17:35, 17 July 2023Thumbnail for version as of 17:35, 17 July 2023630 × 540 (117 KB)Yuasan (talk | contribs)fix
17:31, 17 July 2023Thumbnail for version as of 17:31, 17 July 2023630 × 540 (117 KB)Yuasan (talk | contribs)fix
16:00, 17 July 2023Thumbnail for version as of 16:00, 17 July 2023720 × 540 (111 KB)Yuasan (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

File usage on other wikis

Metadata