comment

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

関連記事

no image

gnuplot で微分記号(文字上のドット)を入力する方法

文字の上にドットを付けて、時間微分を表すことがある。これを gnuplot で表現するには、次のようにする。 例 set encoding utf8 set ylabel “x\U+0307” plo …

no image

python3 で、文字列が別の文字列に含まれているかどうか判定する方法

in 演算子を使うことが最も簡単。 例 str1 = “こんにちは” str2 = “んにち” if str2 in str1:  print(“含まれています”) else:  print(“含まれ …

no image

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

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

no image

std::map の内容が空かどうか判定する方法

map の中身が空であるかどうかには、empty() を使う。 map の要素を消去するには、erase を使う。 例 #include <iostream> #include <map> …

no image

matplotlib で、縦横の罫線を引く方法

破線をカスタマイズする方法 以下では、dashes = [5,2,2,2] で、線5・空白2・線2・空白2の破線を指定している。 詳しくは次を参照。 https://matplotlib.org/st …