Skip to content

Commit

Permalink
minor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewReid854 committed Dec 2, 2021
1 parent 11ac16d commit f9fce70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion reliability/Repairable_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,12 @@ def __init__(
plt.legend()

if log_scale is True:
xmin = 10 ** np.floor(np.log10(min(min(times),target_MTBF)))
ymin = 10 ** np.floor(np.log10(min(MTBF_c)))
if target_MTBF is not None:
xmin = 10 ** np.floor(np.log10(min(min(times), target_MTBF)))
ymax = 10 ** np.ceil(np.log10(max(max(MTBF_c), target_MTBF) * 1.2))
else:
xmin = 10 ** np.floor(np.log10(min(times)))
ymax = 10 ** np.ceil(np.log10(max(MTBF_c) * 1.2))
plt.xlim(xmin, xmax)
plt.ylim(ymin, ymax)
Expand Down

0 comments on commit f9fce70

Please sign in to comment.