We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f268f0d commit f45b6e6Copy full SHA for f45b6e6
adaptive/learner/learner1D.py
@@ -590,12 +590,11 @@ def plot(self):
590
Plot of the evaluated data.
591
"""
592
hv = ensure_holoviews()
593
- if not self.data:
594
- p = hv.Scatter([]) * hv.Path([])
595
- elif not self.vdim > 1:
596
- p = hv.Scatter(self.data) * hv.Path([])
+
+ xs, ys = zip(*sorted(self.data.items())) if self.data else ([], [])
+ if self.vdim == 1:
+ p = hv.Path([]) * hv.Scatter((xs, ys))
597
else:
598
- xs, ys = zip(*sorted(self.data.items()))
599
p = hv.Path((xs, ys)) * hv.Scatter([])
600
601
# Plot with 5% empty margins such that the boundary points are visible
learner.ipynb
0 commit comments