Skip to content

Instantly share code, notes, and snippets.

@avtomat2023
Created June 3, 2020 11:20
Show Gist options
  • Save avtomat2023/bf4eef1f36d8a076154dac71317f5e29 to your computer and use it in GitHub Desktop.
Save avtomat2023/bf4eef1f36d8a076154dac71317f5e29 to your computer and use it in GitHub Desktop.
from matplotlib import pyplot as plt
line_mobile = (
# 最初の2ヶ月は利用料無料
[0] * 2 +
# 1628円/月
[m * 1628 for m in range(49-2)]
)
# 4ヶ月目の月末まで契約継続で8000LINEポイント付与(LINE Payで利用可能)
for i in range(4, len(line_mobile)):
line_mobile[i] -= 8000
# 初期費用3400円(税抜き)
for i in range(len(line_mobile)):
line_mobile[i] += 3400 * 11 // 10
# 解約事務手数料1000円
for i in range(len(line_mobile)):
line_mobile[i] += 1000
uq_mobile = (
# 2178円/月
[m * 2178 for m in range(49)]
)
# 3000円キャッシュバック(時期不明)
for i in range(len(uq_mobile)):
uq_mobile[i] -= 3000
# 初期費用3300円
for i in range(len(uq_mobile)):
uq_mobile[i] += 3300
# 解約料無料
yu_mobile = (
# 1859円/月
[m * 1859 for m in range(49)]
)
# 13ヶ月目の月初まで契約継続で23500円キャッシュバック(手続きが必要)
for i in range(12, len(yu_mobile)):
yu_mobile[i] -= 23500
# 初期費用3400円
for i in range(len(yu_mobile)):
yu_mobile[i] += 3400
# 解約料無料
biglobe = (
# 半年間無料
[0] * 6 +
# 1760円/月
[m * 1760 for m in range(49 - 6)]
)
# 初期費用3394円, 翌月末にポイント還元(料金支払いに利用可能)
biglobe[0] += 3394
biglobe[1] += 3394
# 12ヶ月以内に解約の場合、契約解除料1000円
for i in range(0, 13):
biglobe[i] += 1000
xs = list(range(49))
plt.xlabel("Months")
plt.ylabel("Yen")
plt.xticks([6*i for i in range(4*2+1)])
plt.grid(True)
plt.plot(xs, line_mobile, label="Line mobile")
plt.plot(xs, uq_mobile, label="UQ mobile")
plt.plot(xs, yu_mobile, label="y.u mobile")
plt.plot(xs, biglobe, label="BIGLOBE")
plt.legend()
plt.savefig('mobile-plans.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment