2019-11-25から1日間の記事一覧

matplotlibで散布図に凡例をつける

散布図を描くにはscatterを用いる。scatterとlegendを組み合わせて使う場合の例はこちらにある。 Scatter plots with a legend — Matplotlib 3.1.2 documentation これによると以下の2つの方法がある 凡例としてつけたいlabel毎にscatterを呼ぶ x, y, cにそ…