Hide axs[0,0] and put an arrow that points from axs[1,0] to axs[0,1]. The arrow should…
- User
Hide axs[0,0] and put an arrow that points from axs[1,0] to axs[0,1]. The arrow should be fat and either curved or with a 90° angle. Only return new code.
rng = np.random.default_rng(283567) y_samples = rng.normal(0, 0.04, 10000) w_samples_sim = np.concatenate(simulator_inv(y_samples)) w_samples_sur = np.concatenate(surrogate_inv(y_samples)) fig, axs = plt.subplots(2, 2, sharex="col", sharey=False, figsize=(5, 3)) ax = axs[0,1] ax.set_ylabel("$y$") ax.plot(x_domain, y_simulator, label="Simulator", **SIM_STYLE) ax.plot(x_domain, y_surrogate, label="Surrogate", **SUR_STYLE) ax.scatter(x_c, y_c, label="Colloc. Data", **POINT_STYLE) t = np.linspace(-0.3, 0.3, 100) ax.set_xlim(*ax.get_xlim()) ax.set_ylim(*ax.get_ylim()) # ax.plot(np.abs(np.exp(-(8*t)**2))/8 + ax.get_xlim()[0] + 0.02, t, "g-") # ax.hlines(y_samples, ax.get_xlim()[0], ax.get_xlim()[0]+0.1) for w_star in surrogate_inv([0])[0]: ax.hlines(0, ax.get_xlim()[0], w_star, color="k", ls=":") ax.vlines(w_star, 0, ax.get_ylim()[0], color="k", ls=":") ax = axs[1,0] sns.kdeplot(data=y_samples, label="Data", ax=ax, color="k") ax.set_xlabel("$y$") ax.legend() ax = axs[1,1] sns.kdeplot(data=w_samples_sim, label="Simulator", ax=ax, color="C0") sns.kdeplot(data=w_samples_sur, label="Surrogate", ax=ax, **SUR_STYLE) ax.set_ylim(*ax.get_ylim()) for w_star in surrogate_inv([0])[0]: ax.vlines(w_star, 0, ax.get_ylim()[1], color="k", ls=":") ax.set_ylabel("") ax.set_xlabel("$\\omega$") Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.