I produce the following loglog plot in Python:
Data is here. I would like to add to this plot a series of straight line that starts and ends between these pair of data values:
[1.0, 0.05556],
[1.0, 1.0],
[1.0, 17.9996],
[1.0, 5831.9992]
In Matlab, you simply have to produce the loglog plot as above followed by the simple plot command using as input the pair of data points and both plots get combined into one. Is there a similar way in Python/Matplotlib? I tried using:
plt.loglog(main_data)
plt.plot(linspace_data) # linspace_data is a linear interpolation between the data values above.
but no success...
Basically, I want this plot (generated in Matlab):
This is made much simpler in the O-O interface:
fig, ax = plt.subplots() # this is the only "plt" fxn you need 99% of the time
x = [2, 57]
y = [12, 112]
ax.plot(x, y, '-')
ax.set_yscale('log')
ax.set_xscale('log')