Skip to content

Commit

Permalink
bug in plotting negative errorbars corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoleski committed Jun 16, 2023
1 parent 824fbc7 commit 7bcac6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions source/MulensModel/mulensdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,16 @@ def _plot_datapoints(
y_bad = y_value[self.bad]

if show_errorbars:
if np.any(y_err[self.good] < 0.):
warnings.warn("Cannot plot errorbars with negative values.")
return
container = self._plt_errorbar(time_good, y_good,
y_err[self.good], properties)
if show_bad:
if np.any(y_err[self.bad] < 0.):
warnings.warn("Cannot plot errorbars with negative "
"values (bad data).")
return
if not ('color' in properties_bad or 'c' in properties_bad):
properties_bad['color'] = container[0].get_color()

Expand Down
2 changes: 1 addition & 1 deletion source/MulensModel/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.16.4"
__version__ = "2.16.5"

0 comments on commit 7bcac6c

Please sign in to comment.