@@ -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