From af7933c34b51603ad9ff0c25b942de5163c45512 Mon Sep 17 00:00:00 2001 From: Hu Zhao <zhao@mbd.rwth-aachen.de> Date: Fri, 9 Dec 2022 00:12:39 +0100 Subject: [PATCH] docs: use tight layout for plots --- docs/examples/emulator/robustgasp/plot_scalargasp.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/examples/emulator/robustgasp/plot_scalargasp.py b/docs/examples/emulator/robustgasp/plot_scalargasp.py index cbb5a65..7e0b589 100644 --- a/docs/examples/emulator/robustgasp/plot_scalargasp.py +++ b/docs/examples/emulator/robustgasp/plot_scalargasp.py @@ -30,8 +30,8 @@ emulator = ScalarGaSP(ndim=1) # %% md # # Given training input points ``design`` and corresponding output values ``response``, -# the emulator can be trained. Below we train an emulator using :math:`8` selected -# points. +# the emulator can be trained using :py:meth:`.ScalarGaSP.train`. Below we train +# an emulator using :math:`8` selected points. import numpy as np @@ -68,6 +68,7 @@ ax.set_ylim(np.min(y)-1,np.max(y)+1) _ = ax.plot([np.min(y)-1,np.max(y)+1], [np.min(y)-1,np.max(y)+1]) _ = ax.errorbar(y, validation[:,0], validation[:,1], fmt='.', linestyle='', label='prediction and std') _ = plt.legend() +plt.tight_layout() # %% md @@ -89,6 +90,7 @@ plt.xlabel('x') plt.ylabel('emulator-predicted y') plt.xlim(testing_input[0], testing_input[-1]) _ = plt.legend() +plt.tight_layout() # %% md # @@ -108,6 +110,7 @@ plt.xlabel('x') plt.ylabel('emulator-predicted y') plt.xlim(testing_input[0], testing_input[-1]) _ = plt.legend() +plt.tight_layout() # %% md -- GitLab