How to show only the data points with Getdist mcsamples python?

40 Views Asked by At

I have an array with 7 variables. I want a figure showing plots of each variables with each other. I thought GetDist is a good alternative for that and tried with it (I know that Getdist is initially for visualization of MCMC samples). So the thing is I would like to remove to contour plot and show only the data points on the plots. Is that possible? Getdist already do this for some variables, but not all of them.

Here is my code:

import numpy as np
import matplotlib.pyplot as plt
import getdist # for triangle plots
from getdist import plots, MCSamples

# my data
data = np.array([pwv_column_clean, 
                 CL_az45_19GHz_clean/60/60,
                 CL_az45_17GHz_clean/60/60, 
                 CL_az0_19GHz_clean/60/60, 
                 CL_az0_17GHz_clean/60/60, 
                 CL_az150_19GHz_clean/60/60, 
                 CL_az150_17GHz_clean/60/60])

print(data.shape)

data = data.T # Transpose to get the desired shape
print(data.shape)

# Create MCSamples from the data
# names = ['pwv', 'CL az45 19Ghz', 'CL az45 17Ghz', 'CL az0 19Ghz', 'CL az0 17Ghz', 'CL az150 19Ghz', 'CL az150 17Ghz']  # Replace with your parameter names
names =  ['param1', 'param2', 'param3', 'param4' , 'param5', 'param6', 'param7']
labels = ['pwv [mm]', 'CL-az45-19Ghz [h]', 'CL-az45-17Ghz [h]', 'CL-az0-19Ghz [h]', 'CL-az0-17Ghz [h]', 'CL-az150-19Ghz [h]', 'CL-az150-17Ghz [h]']  # Replace with your parameter labels
samples = MCSamples(samples = data, names = names, labels = labels)

# Create a triangle plot using getdist
g = plots.get_subplot_plotter(subplot_size=2) # Adjust the size according to your needs
g.triangle_plot(samples, filled= True)

# Show the plot
plt.show()

enter image description here

0

There are 0 best solutions below