物理の駅 Physics station by 現役研究者

テクノロジーは共有されてこそ栄える

2023-05-23から1日間の記事一覧

Python+matplotlibで縁取り文字(白抜き文字/黒抜き文字)や太字を描く

matplotlib.patheffectsを使いこなすと良い。 黒抜き文字の例 import matplotlib.patheffects as patheffects import matplotlib.pyplot as plt plt.plot([0,1],[0,1],lw=50) plt.text(0.5,0.5,"testテスト",ha="center",va="center",color="black",fontsize…