mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
feat: auto yrange of obs.plot_tauint improved.
This commit is contained in:
parent
d96c5cab75
commit
bf4680750c
1 changed files with 3 additions and 2 deletions
|
@ -476,11 +476,12 @@ class Obs:
|
|||
label = e_name + ', S=' + str(np.around(self.S[e_name], decimals=2))
|
||||
xmax = max(10.5, 2 * self.e_windowsize[e_name] - 0.5)
|
||||
|
||||
plt.errorbar(np.arange(length), self.e_n_tauint[e_name][:], yerr=self.e_n_dtauint[e_name][:], linewidth=1, capsize=2, label=label)
|
||||
plt.errorbar(np.arange(length)[:int(xmax)], self.e_n_tauint[e_name][:int(xmax)], yerr=self.e_n_dtauint[e_name][:int(xmax)], linewidth=1, capsize=2, label=label)
|
||||
plt.axvline(x=self.e_windowsize[e_name], color='C' + str(e), alpha=0.5, marker=',', ls='--')
|
||||
plt.legend()
|
||||
plt.xlim(-0.5, xmax)
|
||||
plt.ylim(bottom=0.0)
|
||||
ylim = plt.ylim()
|
||||
plt.ylim(bottom=0.0, top=max(1.0, ylim[1]))
|
||||
plt.draw()
|
||||
if save:
|
||||
fig.savefig(save + "_" + str(e))
|
||||
|
|
Loading…
Add table
Reference in a new issue