無地のノート

なんでも書きます

2017-01-01から1ヶ月間の記事一覧

matplotlibの線種(linestyle)を自動で変えてplot

1番目のforの中で処理. import matplotlib.pyplot as plt matplotlib.rcParams['font.family'] = 'Times New Roman' #使用するフォント名 #フォント設定準備 fontprop = matplotlib.font_manager.FontProperties(fname = "C:\\Windows\\Fonts\\times.ttf") …

入れ子になっているlistの成分の最大値

数値計算をしていると, Z=[[1, 2, 3], [4, 5, 6], [7, 8, 9]] なんて行列形式のlistを使うことがよくある. 最大値=9を出すには,リスト内包表記を使って, Z_max = max(max(li) for li in Z) print Z_max とすればよい.

in と of の違い

A of B BがAであること 帰属のof A in B Bに関するA 場所のin dkenglish.blog.fc2.com Can you tell me the difference between "of" and "in"? (pr

LyX で !LaTeX Error: Font family 'J**+*' unknown. が出るとき

直前に, ツール(T)>環境構成(R) などしてしまって環境構成がuplatexになってない場合に生じる. ツール(T)>設定(P)>ファイル処理 で,以下のページのように設定し直す必要がある. LyX/設定/Windows - TeX Wiki