I want to compare two datasets having different numbers by doing the contour plot. What is the best way to compare it? I want to have the same level for two data so that I can compare easily as the number of two datasets is different.
For this case, I use seaborn KDE contour plot taking the same contour level/colour-bar to compare the data. How to do that? When I do plot together at one plot, it is just plotting independently with stacking on the surface of one plot. So, I am not able to compare it as one dataset contains more number than another dataset. Even when I use Plotly contour plot, I got different contour plot.
Here is the sample code for that import numpy as np import matplotlib.pyplot as plt from astropy.table import Table import seaborn as sb
data1=Table.read('data1.fits')
data2=Table.read('data2.fits')
X1=data1['ra']
Y1=data1['dec']
Z1=data1['redshift']
X2=data2['ra']
Y2=data2['dec']
Z2=data2['redshift']
fig = plt.figure(figsize=(12,10))
ax = fig.add_subplot(111,label='1')
k2=sb.kdeplot(X2,Y2,cmap='Reds',shade=False, shade_lowest=True,gridsize=500, cbar=True,annot = True)
k1=sb.kdeplot(X1,Y1,cmap='Blues',shade=False, shade_lowest=True,gridsize=500, cbar=True,annot = True)
ax.scatter(X2,Y2,s=0.8,color='Red')
ax.scatter(X1,Y1,s=0.8,color='blue')
ax.set_xlabel('RA')
ax.set_ylabel('DEC')
ax.set_xlim(349.5,354.3)
ax.set_ylim(-2,1.5)
Here the number of data1 is 397 and data2 is 1058. And the figure is given here.
As we can see the Data1(Blue contour) has less number and it is contouring according to the data. I want to see the densest region among the two datasets. So, How to compare it by using same contour level and what to do with the smoothing value