[bugfix] use only vaild values for plotting
This commit is contained in:
parent
3568a8a59a
commit
79f0982558
@ -155,7 +155,7 @@ class Comparison(object):
|
||||
method = operator.methodcaller(method_name)
|
||||
pdf_list = self.get_all(phase)
|
||||
rarray = map(method, pdf_list)
|
||||
return rarray
|
||||
return np.array(rarray)
|
||||
|
||||
def get_expectation_array(self, phase):
|
||||
return self.get_array(phase, 'expectation')
|
||||
|
@ -238,8 +238,10 @@ class ComparisonDialog(QDialog):
|
||||
bbox_props = dict(boxstyle='round', facecolor='lightgrey', alpha=.7)
|
||||
for phase in self.phases:
|
||||
std = self.data.get_std_array(phase)
|
||||
std = std[np.isfinite(std)]
|
||||
stdxlims = [0., 1.2 * max(std)]
|
||||
exp = self.data.get_expectation_array(phase)
|
||||
exp = exp[np.isfinite(exp)]
|
||||
eps_exp = 0.05 * (max(exp) - min(exp))
|
||||
expxlims = [min(exp) - eps_exp, max(exp) + eps_exp]
|
||||
axes_dict[phase]['std'].hist(std, range=stdxlims, bins=20, normed=False)
|
||||
|
Loading…
Reference in New Issue
Block a user