概述
我有一个三维绘图,想在绘图表面画几条线。我不清楚该如何组织这些线的数据,使之落到表面。在
以下代码的一些解释:我对描述Rubisco酶(光合作用中至关重要)活性的温度敏感参数进行了敏感性分析。活化能Ha是这个方程中唯一的参数。在
函数plot_TemperatureEffectOnRuBisCOKinetics绘制三维绘图。现在,我想在表面上看到函数TemperatureEffectOnRuBisCOKinetics中描述的4个参数中的每一个的行,每一行都被很好地标记。在
对于如何构造这些行的数据,我们将不胜感激!在import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
cRefTmp_C = 25. # [C]
cRefTmp_K = cRefTmp_C + 273.15 # [K]
MolarGasConstant = 8.314472 # [J mol-1 K-1]
def TemperatureEffectOnRuBisCOKinetics(Ha, LeafTemperature_C):
"""
multiplier for temperature effects on Kc, K0, Ri and GammaStar [ - ]
formula thesis Manfred Forstreuter p 66 (eq 2.41)
Parameter ParameterValue
cHaOfGammaStar 29000
cHaOfK0 35900
cHaOfKc 59500
cHaOfRi 46390
refs for equation:
Harley P.C., Thomas R.B., Reynolds J.F., Strain B.R., 1992.
Modelling photosynthesis of cotton grown in elevated CO2. Plant, Cell Environ. 15: 271-282.
Farquhar G.D., von Caemmerer S. & Berry J.A., 1980.
A biochemical model of photosynthetic CO2 assimilation in leaves of C3 species. Planta 149: 78-90.
"""
LeafTemperature_K = LeafTemperature_C + 273.15 # from Celsius to Kelvin
return exp(Ha * (LeafTemperature_K - cRefTmp_K) / (MolarGasConstant * LeafTemperature_K * cRefTmp_K))
def plot_TemperatureEffectOnRuBisCOKinetics():
Ha = np.arange(25000., 60000., 1000.)
T = np.arange(0., 30., 1)
Ha,T = np.meshgrid(Ha,T)
TEff = TemperatureEffectOnRuBisCOKinetics(Ha, T)
fig = plt.figure()
fig = plt.figure(facecolor='White')
ax = fig.gca(projection='3d')
surf = ax.plot_surface(Ha,T,TEff, rstride=1, cstride=1, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
ax.set_zlim(TEff.min() ,TEff.max())
ax.zaxis.set_major_locator(LinearLocator(10))
ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
fig.colorbar(surf, shrink=0.5, aspect=5)
ax.set_title('Effect of temperature on Michaelis Menten-parameters n at different Ha values')
ax.set_xlabel('Activation energy, Ha (J mol-1)')
ax.set_ylabel('Leaf surface temperature (C)')
ax.set_zlabel('T-multiplier to reference value')
plt.show()
plot_TemperatureEffectOnRuBisCOKinetics()
最后
以上就是魔幻人生为你收集整理的python三维图如何标注曲面_如何在matplotlib中在三维曲面上绘制直线的全部内容,希望文章能够帮你解决python三维图如何标注曲面_如何在matplotlib中在三维曲面上绘制直线所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复