简体   繁体   English

使用多个数据集在python中绘制热图

[英]Plotting heat-map in python with multiple data sets

I have a list FFT data which I want to plot in a single heat map. 我有一个列表FFT数据,我想在一个热图中绘制。 Each data set has its own X and Y. Usually I make use of Seaborn and Panda dataframe to plot the heatmap as the Frequency will be common for all the sets, but now the frequency column is unique for each data set. 每个数据集都有自己的X和Y.通常我会使用Seaborn和Panda数据帧绘制热图,因为频率对所有集合都是通用的,但现在频率列对于每个数据集都是唯一的。 How can we plot a heatmap from this kind of data? 我们如何从这种数据中绘制热图?

that is , I have a number of data sets as 也就是说,我有许多数据集

X1,Y1 X1,Y1

X2,Y2 X2,Y2

X3,Y3 X3,Y3

... ...

... ...

Xn,Yn XN,YN

each X is unique and I want to plot these N graphs as a heatmap. 每个X都是唯一的,我想将这N个图形绘制为热图。

The problem was caused due to the fact that the Data was of non-uniform grid, now I created a common domain (x-axis value) for all the functions and then interpolated all the Data set to the new X-value. 问题是由于数据是非均匀网格的事实引起的,现在我为所有函数创建了一个公共域(x轴值),然后将所有数据集内插到新的X值。

I used the numpy.interpol() function to achieve this. 我使用numpy.interpol()函数来实现这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM