From 1a658c6f4ef22551dc4abb79991419bb10df7902 Mon Sep 17 00:00:00 2001 From: Michael BAUDIN Date: Sun, 8 Dec 2024 21:47:26 +0100 Subject: [PATCH] Remove figsize from the examples --- doc/examples/plot_finite_differences.py | 2 +- doc/examples/plot_gill_murray_saunders_wright.py | 3 ++- doc/examples/plot_stepleman_winarsky_plots.py | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/examples/plot_finite_differences.py b/doc/examples/plot_finite_differences.py index 57e5bff..e856705 100644 --- a/doc/examples/plot_finite_differences.py +++ b/doc/examples/plot_finite_differences.py @@ -144,7 +144,7 @@ def plot_step_sensitivity( f_prime_approx = finite_difference.compute(step_array[i]) error_array[i] = abs(f_prime_approx - function_derivative(x)) - pl.figure(figsize=(3.0, 2.5)) + pl.figure() pl.plot(step_array, error_array, label="Computed") pl.title(finite_difference.__class__.__name__) pl.xlabel("h") diff --git a/doc/examples/plot_gill_murray_saunders_wright.py b/doc/examples/plot_gill_murray_saunders_wright.py index 7ca5f7e..211c348 100644 --- a/doc/examples/plot_gill_murray_saunders_wright.py +++ b/doc/examples/plot_gill_murray_saunders_wright.py @@ -222,7 +222,7 @@ def plot_error_vs_h_with_GMSW_steps( minimum_error = np.nanmin(error_array) maximum_error = np.nanmax(error_array) - pl.figure(figsize=(3.0, 2.0)) + pl.figure() pl.plot(h_array, error_array) pl.plot( [step] * 2, @@ -236,6 +236,7 @@ def plot_error_vs_h_with_GMSW_steps( pl.xscale("log") pl.yscale("log") pl.legend(bbox_to_anchor=(1.0, 1.0)) + pl.tight_layout() return diff --git a/doc/examples/plot_stepleman_winarsky_plots.py b/doc/examples/plot_stepleman_winarsky_plots.py index 8854376..7ec4ef8 100644 --- a/doc/examples/plot_stepleman_winarsky_plots.py +++ b/doc/examples/plot_stepleman_winarsky_plots.py @@ -33,7 +33,7 @@ h = h_array[i] n_digits_array[i] = algorithm.number_of_lost_digits(h) -pl.figure(figsize=(4.0, 3.0)) +pl.figure() pl.plot(h_array, n_digits_array) pl.title(r"Number of digits lost by F.D.. $f(x) = \exp(x)$") pl.xlabel("h") @@ -51,7 +51,7 @@ n_digits_array[i] = algorithm.number_of_lost_digits(h) # %% -pl.figure(figsize=(4.0, 3.0)) +pl.figure() pl.plot(h_array, n_digits_array) pl.title(r"Number of digits lost by F.D.. $f(x) = \sin(x)$") pl.xlabel("h") @@ -92,7 +92,7 @@ def plot_error_vs_h_with_SW_steps( minimum_error = np.nanmin(error_array) maximum_error = np.nanmax(error_array) - pl.figure(figsize=(5.0, 3.0)) + pl.figure() pl.plot(h_array, error_array) pl.plot( [h_min] * 2,