@@ -443,7 +443,7 @@ def plot_corner(
443443 plot_one_hist (results , param = row_param , smooth = smooth , axes = current_axes , ** hist_kwargs )
444444 elif i > j : # lower triangle: 2d histograms
445445 plot_contour (
446- results , x_param = row_param , y_param = col_param , smooth = smooth , axes = current_axes , ** hist2d_kwargs
446+ results , x_param = col_param , y_param = row_param , smooth = smooth , axes = current_axes , ** hist2d_kwargs
447447 )
448448 elif i < j : # upper triangle: no plot
449449 current_axes .set_visible (False )
@@ -629,8 +629,7 @@ def plot_contour(
629629 default_settings = {"bins" : 25 , "density" : True }
630630 hist2d_settings = {** default_settings , ** hist2d_settings }
631631
632- counts , y_bins , x_bins = np .histogram2d (results .chain [:, x_param ], results .chain [:, y_param ], ** hist2d_settings )
633- counts = counts .T # for some reason the counts given by numpy are sideways
632+ counts , x_bins , y_bins = np .histogram2d (results .chain [:, x_param ], results .chain [:, y_param ], ** hist2d_settings )
634633 if smooth :
635634 if sigma is None :
636635 sigma_x = stdev (results .chain [:, x_param ]) / 2
@@ -641,8 +640,8 @@ def plot_contour(
641640 counts = gaussian_filter1d (counts , axis = 0 , sigma = sigma_x )
642641 counts = gaussian_filter1d (counts , axis = 1 , sigma = sigma_y )
643642
644- axes .pcolormesh (x_bins , y_bins , counts .max () - counts . T , cmap = matplotlib .colormaps ["Greys" ].reversed ())
645- axes .contour (x_bins [:- 1 ], y_bins [:- 1 ], counts .max () - counts . T , colors = "black" )
643+ axes .pcolormesh (x_bins , y_bins , counts .max () - counts , cmap = matplotlib .colormaps ["Greys" ].reversed ())
644+ axes .contour (x_bins [:- 1 ], y_bins [:- 1 ], counts .max () - counts , colors = "black" )
646645 axes .set_xlabel (results .fitNames [x_param ])
647646 axes .set_ylabel (results .fitNames [y_param ])
648647
0 commit comments