lw で、線幅を数字で指定すればよい。
例
from matplotlib import pyplot as plt
data_x = [25,26,27]
data_y = [39,41,50]
data_y2 = [40,20,17]
plt.plot(data_x,data_y,c='green',lw = '3')
plt.plot(data_x,data_y2,c='blue',lw = '5')
plt.show()
結果

雑記
投稿日:
lw で、線幅を数字で指定すればよい。
from matplotlib import pyplot as plt
data_x = [25,26,27]
data_y = [39,41,50]
data_y2 = [40,20,17]
plt.plot(data_x,data_y,c='green',lw = '3')
plt.plot(data_x,data_y2,c='blue',lw = '5')
plt.show()

執筆者:seyanen
関連記事
python3 で、dictionary のキー一覧を取得する方法
dict.keys() でキーを取得することができる。 参考:dictionary の値一覧を取得するときは、dict.values() を使う。 例 print(dict.keys())
python におけるシフト演算子(<< と >> )の使い方
32 = 2^5 なので、 << 1 とすると数値は2倍され、 >> 1 とすると数値が2分の1となる。 例 print(32 << 0) print(32 << …
python の __str__ と __repr__ とは
python でクラスの情報を文字列で表示するとき、__str__ メソッドと __repr__ メソッドが使える。__str__ は、プログラマーとは限らないユーザーに「読める形で情報を表示」するこ …
辞書に対して、items() メソッドを使うと、タプルを作成することができる。 例 cities = {‘東京’:1000,’大阪’:700, ‘広島’:100} for a,b in cities. …
python3 で、配列の最大値のインデックスを1つ求める方法
配列の index() メソッドを使うと、その値のインデックスを求めることができる。 最大値を求めるメソッド max と組み合わせて使う。 例 arr = [2,4,5,10,8,-3] in …
2023/01/18
matplotlib のグラフ作成と gnuplot との対応 比較
2022/10/14
pythonで配列(リスト)の、ある要素がわかっているときにその次の要素を取得する方法。