这是一个非常简单的问题,但它逃避了我。我只是想在我的 python 图的标题和图例中插入一个度数符号。代码如下。谢谢。
from numpy import *
import numpy as np
import matplotlib.pyplot as plt
theta1 = linspace(0,60,610)
theta2 = linspace(0,45,460)
theta3 = linspace(45,90,460)
CTS = 1/cos(radians(theta1))
CTS0 = 1/cos(radians(60-theta2))
CTS45 = 1/cos(radians(105-theta3))
plt.plot(theta1,CTS,label=u'CTS Head at 0',linewidth=2)
plt.plot(theta2,CTS0,label='CTS Head at 60',linewidth=2)
plt.plot(theta3,CTS45,label='CTS Head at 105',linewidth=2)
plt.xlabel('Manufactured Ply Angle (degrees)')
plt.ylabel('Thickness')
plt.legend( loc='lower right', numpoints = 1 )
plt.ylim([0,2.5])
plt.grid(b=None, which='major', axis='both')
plt.grid(color='k', linestyle='--', linewidth=0.5)
plt.axhline(y=1.035, xmin=0, xmax=90,color='k', linestyle='-', linewidth=1)
plt.show()