Signals are recorded for many temperatures and at some temperatures (that are evenly spaced), more complex experiments are performed with another varying parameter.
This is a simple simulated example.
def my_temp_func(temp):
return -0.05*(temp-350.0)**2+2500
all_temp=np.linspace(150.0, 550.0, 100)
some_temp=np.linspace(200.0, 500.0, 4)
fig, axs = plt.subplots(figsize=(9,3))
axs.plot(all_temp,my_temp_func(all_temp),marker='None')
axs.plot(some_temp,my_temp_func(some_temp),marker='o',linestyle='None');
On this figure, a signal is recorded between 150K and 550K. And at some temperature values (orange mark), more complex experiments are performed and they are plotted on a grid.
def my_response_func(temp,I0,time):
inf_resp=my_temp_func(temp)
return inf_resp*(I0*np.exp(-0.005*time)+1)
all_time=np.linspace(0, 1000, 1000)
some_exc=np.linspace(1, 1.5, 3)
fig, axs = plt.subplots(len(some_exc), len(some_temp), figsize=(9,6), sharex=True, sharey=True)
plt.subplots_adjust(wspace=0, hspace=0)
for i,i_temp in enumerate(some_temp):
for j,j_exc in enumerate(some_exc):
axs[j][i].plot(all_time,my_response_func(i_temp,j_exc,all_time),marker='None')
axs[j][i].tick_params(labelbottom = False)
for ax, label in zip(axs[:,0], some_exc):
ax.set_ylabel("Exc:"+str(label), rotation=90, size='x-large', labelpad=10)
for ax, label in zip(axs[-1,:], some_temp):
ax.set_xlabel(str(label)+"K", rotation=0, size='x-large', labelpad=10)
This is the resulting figure :
I would like to have the two figures on the same one with the orange point align with the corresponding columns in the grid of the second plot. Actually, I do it by hand but I wondered if it is possible to automatize it ? (nb : the orange points are evenly spaced.)
For example, something like that :