本文介绍了如何正确绘制阿累尼乌斯图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法显示正确的阿累尼乌斯图.我应该得到一条直线,但一直得到一条曲线.我得到的数据如下:
0.00 , 0.0658100.00 , 0.4692200.00 , 1.4577300.00 , 3.0489400.00 , 5.1213500.00 7.5221600.00, 10.1170
其中左列是开尔文温度,右列是反应速率.
这是我创建的代码:
from pylab import *从 scipy 导入 *实验输入 = loadtxt("RateT.txt", delimiter=",")实验 = 转置(实验输入)#将摄氏度转换为开尔文摄氏度 = 实验 [0]x_data = 摄氏度 + 273.15y_data = 实验 [1]#反转x轴plt.gca().invert_xaxis()#创建标签xlabel("1/T (K)")ylabel("反应率")#绘图...绘图(x_data,y_data)#使y轴对数符号学()网格()表演()
我做错了什么吗?任何帮助表示赞赏.
解决方案
您忘记在
I am having trouble displaying a correct arrhenius plot. I am supposed to get a straight line but am consistently getting a curve. The data I have is as follows:
0.00 , 0.0658
100.00 , 0.4692
200.00 , 1.4577
300.00 , 3.0489
400.00 , 5.1213
500.00 , 7.5221
600.00 , 10.1170
where the left column is temperature in kelvin and the right column is reaction rate.
This is the code I have created:
from pylab import *
from scipy import *
experimentinput = loadtxt("RateT.txt", delimiter=",")
experiment = transpose(experimentinput)
#converting celcius to kelvin
celcius = experiment[0]
x_data = celcius + 273.15
y_data = experiment [1]
#inverting x-axis
plt.gca().invert_xaxis()
#creating labels
xlabel("1/T (K)")
ylabel("Reaction Rate")
#plotting...
plot(x_data, y_data)
#making the y-axis logarythmic
semilogy()
grid()
show()
Is there something I'm doing wrong? Any help is appreciated.
解决方案
You forgot to plot 1/temperature(K) in your Arrhenius plot.
Here is a complete cut-and-pastable version of your example:
from pylab import *
from scipy import *
from StringIO import StringIO
data = """
0.00 , 0.0658
100.00 , 0.4692
200.00 , 1.4577
300.00 , 3.0489
400.00 , 5.1213
500.00 , 7.5221
600.00 , 10.1170"""
celcius,y_data = loadtxt(StringIO(data), delimiter=",",unpack=True)
#converting celcius to kelvin
kelvin = celcius + 273.15
#creating labels
xlabel("1/T (K)")
ylabel("Reaction Rate")
#plotting...
plot(1/kelvin, y_data)
#making the y-axis logarythmic
semilogy()
grid()
show()
这篇关于如何正确绘制阿累尼乌斯图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!