Skip to content

Commit

Permalink
added labels to cmd plots
Browse files Browse the repository at this point in the history
  • Loading branch information
HeloiseS committed Oct 31, 2019
1 parent c7f22a4 commit 9bab259
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hoki/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def __init__(self, file,
self._time_bins = None
self._log_ages = None
self._ages = None
self.filter1 = None
self.filter2 = None

def make(self, filter1, filter2):
"""
Expand All @@ -105,9 +107,12 @@ def make(self, filter1, filter2):
None
"""

self.filter1 = str(filter1)
self.filter2 = str(filter2)

# FIND THE KEYS TO THE COLUMNS OF INTEREST IN DUMMY

col_keys = ['timestep', 'age', str(filter1), str(filter2), 'M1', 'log(R1)', 'log(L1)']
col_keys = ['timestep', 'age', self.filter1, self.filter2, 'M1', 'log(R1)', 'log(L1)']

try:
cols = tuple([dummy_dict[key] for key in col_keys])
Expand Down Expand Up @@ -326,6 +331,9 @@ def plot(self, log_age=6.8, loc=111, cmap='Greys', **kwargs):

cm_diagram.invert_yaxis()

cm_diagram.set_ylabel(self.filter1)
cm_diagram.set_xlabel(self.filter1+"-"+self.filter2)

return cm_diagram


Expand Down

0 comments on commit 9bab259

Please sign in to comment.