Skip to content

Commit 618483e

Browse files
committed
2D: plot in the unit box minus a small epsilon
1 parent 1b421ad commit 618483e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

adaptive/learner/learner2D.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,8 @@ def plot(self, n=None, tri_alpha=0):
547547
# numerical precision problems it could (for example) be
548548
# (-0.5000000000000001, 0.49999999999999983), then any point at exact
549549
# boundary would be outside of the domain. See #181.
550-
x_min, y_min = np.min(ip.points, axis=0)
551-
x_max, y_max = np.max(ip.points, axis=0)
552-
x = np.linspace(x_min, x_max, n)
553-
y = np.linspace(y_min, y_max, n)
550+
eps = 1e-13
551+
x = y = np.linspace(-0.5 + eps, 0.5 - eps, n)
554552
z = ip(x[:, None], y[None, :] * self.aspect_ratio).squeeze()
555553

556554
if self.vdim > 1:

0 commit comments

Comments
 (0)