Skip to content

Commit 261c183

Browse files
0.31.15
Kriging plot adds points
1 parent 479c36a commit 261c183

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "spotpython"
10-
version = "0.31.14"
10+
version = "0.31.15"
1111
authors = [
1212
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
1313
]

src/spotpython/surrogate/kriging.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ def objective(logtheta_lambda):
731731
result = differential_evolution(objective, bounds)
732732
return result.x, result.fun
733733

734-
def plot(self, i: int = 0, j: int = 1, show: Optional[bool] = True) -> None:
734+
def plot(self, i: int = 0, j: int = 1, show: Optional[bool] = True, add_points: bool = True) -> None:
735735
"""
736736
This function plots 1D and 2D surrogates.
737737
Only for compatibility with the old Kriging implementation.
@@ -746,6 +746,8 @@ def plot(self, i: int = 0, j: int = 1, show: Optional[bool] = True) -> None:
746746
show (bool):
747747
If `True`, the plots are displayed.
748748
If `False`, `plt.show()` should be called outside this function.
749+
add_points (bool):
750+
If `True`, the points from the design are added to the plot.
749751
750752
Returns:
751753
None
@@ -795,4 +797,4 @@ def plot(self, i: int = 0, j: int = 1, show: Optional[bool] = True) -> None:
795797
if show:
796798
plt.show()
797799
else:
798-
plotkd(model=self, X=self.X_, y=self.y_, i=i, j=j, show=show, var_type=self.var_type)
800+
plotkd(model=self, X=self.X_, y=self.y_, i=i, j=j, show=show, var_type=self.var_type, add_points=True)

0 commit comments

Comments
 (0)