comment

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

関連記事

no image

convert コマンドで最大画像サイズを指定して画像を変換する方法

-extent のオプションで画像の希望の最大サイズを入力しておくことにより、そのサイズ(下の例では5キロバイト)になる。 同時に、希望の画像の大きさも、-resize オプションを使って入力しておく …

no image

matplotlib で、ヒストグラムを作成する方法

ヒストグラムを描くには、data_hist を使う。 ヒストグラムの縦棒の数は bins で指定する。 例 from matplotlib import pyplot as plt data_hist …

no image

python3 で文字列のリストを結合する方法

list に対して、extend を使う。 例 list1 = [1,2,3] list2 = [4,5,6] list1.extend(list2) print(list1) 結果 [1, 2, 3 …

no image

python3 で文字列を区切り文字を指定してリストに変換する方法

split メソッドを使う。 例 str1 = ‘this, is, a, pen’ str2 = str1.split(‘,’) print(str2) 結果 [‘this’, ‘ is’, ‘ a …

no image

matplotlib で x軸・y軸ラベルをつける

plt.xlabel と plt.ylabel を使う。 例 import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, …