Commit 036d47ef authored by LUSTIG Peter's avatar LUSTIG Peter

Added Colorbar to Draft Plot.

parent e1cd14e9
......@@ -26,6 +26,7 @@ ipython = get_ipython()
import myfunctions as mfct
from time import clock
from import fits
from mpl_toolkits.axes_grid1 import make_axes_locatable
if '__IPYTHON__' in globals():
ipython.magic('load_ext autoreload')
......@@ -311,8 +312,14 @@ def Plot_CompPur(completness, purity, threshold,nsim=None, savename=None):
fig, axes = plt.subplots(nrows=2, ncols=threshold_bins, sharex=True, sharey=True)
for i in range(threshold_bins):
axes[0, i].imshow(completness[:, :, i], vmin=0, vmax=1)
axes[1, i].imshow(purity[:, :, i], vmin=0, vmax=1)
im=axes[1, i].imshow(purity[:, :, i], vmin=0, vmax=1)
axes[1, i].set_xlabel("thresh={:.2f}".format(threshold[i]))
if i == (threshold_bins-1):
divider = make_axes_locatable(axes[1,i])
cax = divider.append_axes('right', size='10%', pad=0.0)
fig.colorbar(im, cax=cax, orientation='vertical')
if nsim is not None:
axes[0, 0].set_title("{} simulations".format(nsim))
axes[0, 0].set_ylabel("completness")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment