# Workaround to plot full extent of ratios that don't have H2 after they've been clipped to run a fit.
# The trick is to pass them in via the measurements keywords.
# This is possible because Marc was super clever and stores models as class Measurement.
b = [m1,m3,m4,m5] # reset b in case this cell gets re-run
print(plot._tool._modelratios.keys())
kluge = ["OI_63/CII_158", "CII_158/CO_32"] # the lines you want to extend on the plot
savek = dict()
for k in kluge:
b.append(p._observedratios[k]) # add them to measurements
savek[k] = plot._tool._modelratios.pop(k) # remove them from model ratios
print(plot._tool._modelratios.keys()) # double-check they are gone
plot.overlay_all_ratios(yaxis_unit="Habing",figsize=(15,5),legend=True,measurements=b,loc='upper left',bbox_to_anchor=(1.05,0.9))
#xlim=[10,4E6],ylim=[10,4E6]
plot._plt.text(20,1000000,"random")
plot._plt.text(1E6,1.7E3,"from FIR")
G = 0.9046/(2*1.3E-4)
plot._plt.plot([10,1E7],[G,G],color='black',linewidth=1)
plot.savefig("spaghetti-random-toolbox.png")
# now put the models back! It's ok that the order has changed.
plot._tool._modelratios.update(savek)
print(plot._tool._modelratios.keys())