How To Offset The X Axis And Log The Y Axis And To Find The Gradient Of My Graph From An External File
I am new to Python code and I need to graph my experiment data for my lab portfolio however I can't seem to log the y-axis and offset the x-axis or even know where to start for the
Solution 1:
- splitting lines yields strings. convert them to numbers:
float(line.split()[0])
(orint()
if you have integers) plt.yscale('log')
- x limits should be adjusted automatically. if you want to transform the data you can do
x_1 = x_1 + offset
or you can fiddle withplt.xlim(low, high)
Post a Comment for "How To Offset The X Axis And Log The Y Axis And To Find The Gradient Of My Graph From An External File"