Skip to content

Commit

Permalink
don't treat the no data case differently
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed May 15, 2019
1 parent 8462acb commit 6212a37
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions adaptive/learner/learner1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,12 +590,10 @@ def plot(self):
Plot of the evaluated data.
"""
hv = ensure_holoviews()
if not self.data:
p = hv.Scatter([]) * hv.Path([])
elif not self.vdim > 1:
if self.vdim <= 1:
p = hv.Scatter(self.data) * hv.Path([])
else:
xs, ys = zip(*sorted(self.data.items()))
xs, ys = zip(*sorted(self.data.items())) if self.data else ([], [])
p = hv.Path((xs, ys)) * hv.Scatter([])

# Plot with 5% empty margins such that the boundary points are visible
Expand Down

0 comments on commit 6212a37

Please sign in to comment.