Skip to content

Instantly share code, notes, and snippets.

@reinkim
Created May 20, 2021 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reinkim/409e4d0122de8126cfd5f41bf3f82658 to your computer and use it in GitHub Desktop.
Save reinkim/409e4d0122de8126cfd5f41bf3f82658 to your computer and use it in GitHub Desktop.
#!/usr/bin/env gnuplot
# vim: fileencoding=utf-8 tabstop=2 softtabstop=2 shiftwidth=2 expandtab
set datafile sep ","
# 전체
#set term svg size 1024,768 name "monthly_tax_and_deductions"
#set output 'tax-all.svg'
set term pngcairo size 1024,768
set output 'tax-all.png'
set title "월별 세액 및 공제액 (외벌이 4인 가구)"
set rmargin 5
set xdata # numeric
set xlabel "연봉 (만원)"
set xrange [2200:]
set ylabel "세액 및 준조세액 (만원)"
plot "tax-simulation-2021.csv" using ($1/10000):(($2+$3)/10000) title "소득세" with line, \
"tax-simulation-2021.csv" using ($1/10000):($4/10000) title "국민연금" with line, \
"tax-simulation-2021.csv" using ($1/10000):(($5+$6)/10000) title "건강보험" with line, \
"tax-simulation-2021.csv" using ($1/10000):($7/10000) title "고용보험" with line
# median까지.
#set term svg size 1024,768 name "monthly_tax_and_deductions"
#set output 'tax-median.svg'
set term pngcairo size 1024,768
set output 'tax-median.png'
set title "월별 세액 및 공제액 (외벌이 4인 가구; 중위소득이하)"
set xrange[2200:6000]
set xdata # numeric
set xlabel "연봉 (만원)"
set ylabel "세액 및 준조세액 (만원)"
set title "월별 세액 및 공제액 (외벌이 4인 가구)"
plot "tax-simulation-2021.csv" using ($1/10000):(($2+$3)/10000) title "소득세" with line, \
"tax-simulation-2021.csv" using ($1/10000):($4/10000) title "국민연금" with line, \
"tax-simulation-2021.csv" using ($1/10000):(($5+$6)/10000) title "건강보험" with line, \
"tax-simulation-2021.csv" using ($1/10000):($7/10000) title "고용보험" with line
# median까지.
#set term svg size 1024,768 name "monthly_tax_and_deductions"
#set output 'tax-median-200.svg'
set term pngcairo size 1024,768
set output 'tax-median-200.png'
set title "월별 세액 및 공제액 (외벌이 4인 가구; 중위소득 200%)"
set xrange[2200:12000]
set xdata # numeric
set xlabel "연봉 (만원)"
set ylabel "세액 및 준조세액 (만원)"
set title "월별 세액 및 공제액 (외벌이 4인 가구)"
plot "tax-simulation-2021.csv" using ($1/10000):(($2+$3)/10000) title "소득세" with line, \
"tax-simulation-2021.csv" using ($1/10000):($4/10000) title "국민연금" with line, \
"tax-simulation-2021.csv" using ($1/10000):(($5+$6)/10000) title "건강보험" with line, \
"tax-simulation-2021.csv" using ($1/10000):($7/10000) title "고용보험" with line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment