다음 코드가 있지만 제목이 올바르게 렌더링되지 않습니다.Matplotlib 플롯의 제목에 LaTeX이 올바르게 렌더링되지 않습니다.
#!/usr/bin/python
import matplotlib.pyplot as plt
import numpy as np
t = np.array([0.19641715476064042,
0.2524989689506581,
0.3411612727146944,
0.4232070334074150])
c = np.array([0.17999670292553419,
0.21057542001074211,
0.2752899228849294,
0.36577079519040556])
plt.rc('text', usetex=True)
plt.rc('font', family='serif')
plt.title('$P(A_i = 0| A_j = 0 \forall j < i)$')
plt.plot(t, '-go', markerfacecolor='w', linestyle= 'dotted', label='n=20')
plt.plot(c, '-bo', markerfacecolor='w', linestyle= 'dotted', label='n=22')
plt.legend()
plt.show()
다음은 렌더링 된 이미지에서 보는 이미지입니다. 대신 내가 무엇을해야합니까?
그게 전부 야! 고맙습니다. – eleanora
반갑습니다. – TheBigH