Skip to content

Commit 6292c2f

Browse files
0.30.3
1 parent cfcf579 commit 6292c2f

2 files changed

Lines changed: 7 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.30.2"
10+
version = "0.30.3"
1111
authors = [
1212
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
1313
]

src/spotpython/mo/plot.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def plot_mo(
2727
y_add_label="Add",
2828
y_add2_label="Add2",
2929
filename: str = None,
30+
figsize: tuple = (9, 6),
3031
) -> None:
3132
"""
3233
Generates scatter plots for each combination of two targets from a multi-output prediction while highlighting Pareto optimal points.
@@ -54,7 +55,9 @@ def plot_mo(
5455
x_axis_transformation (str): Transformation for the x-axis. Options are "id" (linear), "log" (logarithmic), and "loglog" (log-log). Defaults to "id".
5556
y_axis_transformation (str): Transformation for the y-axis. Options are "id" (linear), "log" (logarithmic), and "loglog" (log-log). Defaults to "id".
5657
filename (str, optional):
57-
If provided, saves the plot to the specified file. Supports "pdf" and "png" formats. Defaults to None.
58+
If provided, saves the plot to the specified file. Supports "pdf" and "png" formats. Defaults to None.
59+
figsize (tuple):
60+
Figure size (width, height) in inches. Default is (9, 6).
5861
5962
Returns:
6063
None: Displays or saves the plot.
@@ -78,7 +81,8 @@ def plot_mo(
7881
y_orig = y_orig.values
7982

8083
for i, j in combinations:
81-
plt.figure()
84+
# Create figure with specified size
85+
plt.figure(figsize=figsize)
8286
s = 50 # Base size for points
8387
pareto_size = s # Size for Pareto points
8488
if pareto_label:

0 commit comments

Comments
 (0)