LoginSignup
harurun929
@harurun929

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

カラーマップと散布図の重ね書き

解決したいこと

カラーマップの上にグラフを重ね書きしたい
下記のコードで、カラーマップ、散布図はそれぞれで作成できたが、カラーマップ上に散布図を重ね書きしたいがうまくできません。どのようにコードを修正することで重ね書きができるようになりますか?

該当するソースコード

Python
ソースコードを入力
python
import re, glob
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

df = pd.read_csv('test.csv',index_col=0)
y= df.index
x = pd.read_csv('test.csv', header=None,index_col=0, nrows=1)
fig, ax = plt.subplots()
mappable = ax.pcolormesh(x,y,df, shading="gouraud", cmap="jet")
ax.set_xlabel("Id [A]")
ax.set_ylabel("Iq [A]")
plt.colorbar(mappable, ax=ax)
b= pd.read_csv('test1.csv')
b.plot(x="X",y="Y")
fig.tight_layout()
plt.show()

0

1Answer

Your answer might help someone💌