0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

あつ森の株価の変化を見れるプログラム(未完成)

Posted at

###あつ森で1週間の株価推移を調べるときに、グラフ化出来たら見やすいなぁと思って作ってみました。
(2020/04/09追記 グラフ上に数字が出せないので未完成です。折れ線グラフが良かったかなぁ。。。どなたか手直ししてください。。。)

以下コード


import matplotlib.pyplot as plt
import japanize_matplotlib

week = ["", "", "", "", "", ""]
ap = ["", ""]
stock = []
labels = []

for i in range(len(week)):
    for j in range(len(ap)):
        print("--------------------------------------------------")
        q = int(input(week[i] + "曜日,午" + ap[j] + "の株価を入力してください 000で終了:"))
        if q == 000:
            break
        else:
            stock.append(q)
            labels.append(week[i] + "/" + ap[j])
    else:
        continue
    break


if len(stock) != 0:
    print(stock)
    x = range(0, 12)
    y = stock
    plt.bar(x, y, tick_label = labels) 
    plt.show()
else:
    print("終了しました")
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?