Skip to content

Commit

Permalink
Remove figsize from the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudin47 committed Dec 8, 2024
1 parent 8efb01a commit 1a658c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/examples/plot_finite_differences.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion doc/examples/plot_gill_murray_saunders_wright.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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


Expand Down
6 changes: 3 additions & 3 deletions doc/examples/plot_stepleman_winarsky_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1a658c6

Please sign in to comment.