2025.7.22 scatterのマーカー【matplotlib】
code:p.py
import matplotlib.pyplot as plt
import numpy as np
for style in styles:
mask = styles == style
plt.show()
code:p.py
“.” point 点
“,” pixel 四角形
“o” circle 円
“v” triangle_down 下向き三角形
“^” triangle_up 上向き三角形
“<" triangle_left 左向き三角形
“>” triangle_right 右向き三角形
“1” tri_down Y 字
“2” tri_up Y 字 (上下反転)
“3” tri_left Y 字 (90 度時計回り)
“4” tri_right Y 字 (90 度反時計回り)
“8” octagon 八角形
“s” square 四角形
“p” pentagon 五角形
“*” star 星印
“h” hexagon1 六角形 (縦長)
“H” hexagon2 六角形 (横長)
“+” plus プラス (+) 印
“x” x バツ (×) 印
“D” diamond 菱形 (ダイヤモンド)
“d” thin_diamond 細い菱形 (ダイヤモンド)
“|” vline 縦線
“_” hline 横線
“None” nothing マーカーなし
None nothing マーカーなし
” “ nothing マーカーなし
“” nothing マーカーなし
‘$…$’ render the string using mathtext. Mathtext を用いて数式やギリシャ文字を指定