### GetDist : make appear mean values for contours on both x-axis and y-axis

Posted:

**May 14 2020**Hi,

I have an example of triplot (using triangle_plot) which is deduced from a Covariance matrix to get the contours of considered parameters.

Here the script :

Below the plot :

As you can see, the mean for each of the parameter is not systematically displayed on both axis (x-axis and y-axis) : especially, on y-axis, the mean for [math] is shown whereas on x-axis, I have just an interval and not the mean.

For Hubble parameter [math], I have just an interval for both axis. Same issue with [math] and [math] parameters.

Concerning the other parameters, everything is working fine. So what's wrong to make print these missing mean values on both axis for a triangle plot ?

Any suggestion/clue is welcome. Regards

I have an example of triplot (using triangle_plot) which is deduced from a Covariance matrix to get the contours of considered parameters.

Here the script :

Code: Select all

```
# Show plots inline, and load main getdist plot module and samples class
from __future__ import print_function
import sys, os
sys.path.insert(0,os.path.realpath(os.path.join(os.getcwd(),'..')))
import numpy as np
import getdist
from getdist import plots
import matplotlib.pyplot as plt
import matplotlib as mpl
# The plotting scripts also let you plot Gaussian (or Gaussian mixture) contours
from getdist.gaussian_mixtures import GaussianND
from getdist.gaussian_mixtures import Mixture2D
print('GetDist Version: %s, Matplotlib version: %s'%(getdist.__version__, plt.matplotlib.__version__))
## Load Fisher matrix and invert it to get Covariance array
# Load Fisher matrix
File1 = np.loadtxt('File1.dat')
# Invert to get Covariance matrix
COV_File1 = np.linalg.inv(File1)[0:7,0:7]
# Mean of each cosmo parameters : respect order of generated "Big" Fisher matrix
mean = [0.32, 0.05, -1.0, 0.0, 0.96, 0.67, 0.815]
# Names and labels
names = ['Omega_m', 'Omega_b', 'w_0', 'w_a', 'h', 'n_s', 'sigma_8']
labels = [r'\Omega_{m}', r'\Omega_{b}', r'w_{0}', r'w_{a}', r'h', r'n_{s}', r'\sigma_{8}']
# Current method
matrix1 = GaussianND(mean, COV_File1, labels = labels, names = names)
# Plot triplot
plt.rcParams['text.usetex'] = True
plt.rc_context({'axes.autolimit_mode': 'round_numbers'})
g = plots.get_subplot_plotter()
g.settings.figure_legend_frame = True
g.settings.legend_fontsize = 24
g.settings.axes_labelsize = 24
g.settings.axes_fontsize = 20
g.settings.axis_tick_x_rotation = 45
g.settings.axis_tick_y_rotation = 45
g.settings.alpha_filled_add = 0.9
g.settings.title_limit_fontsize = 1
g.triangle_plot(matrix1,
names,
filled = True,
legend_labels = ['File1'],
contour_colors = ['green']
)
# Save triplot
g.export('output_example.png')
```

As you can see, the mean for each of the parameter is not systematically displayed on both axis (x-axis and y-axis) : especially, on y-axis, the mean for [math] is shown whereas on x-axis, I have just an interval and not the mean.

For Hubble parameter [math], I have just an interval for both axis. Same issue with [math] and [math] parameters.

Concerning the other parameters, everything is working fine. So what's wrong to make print these missing mean values on both axis for a triangle plot ?

Any suggestion/clue is welcome. Regards