Print latex-formula with python

Я тоже искал тот же вариант. Кажется, прямого пути нет. Но мы можем отключить всплывающую подсказку по умолчанию и открыть нашу собственную версию, используя SelectHandler. Дайте нам знать, если вы нашли более лучший / прямой путь. Благодаря

12
задан kame 21 November 2019 в 08:40
поделиться

2 ответа

Потяните с matplotlib,

import matplotlib.pyplot as plt
a = r'\frac{a}{b}'
ax=plt.subplot(111)
ax.text(0.5,0.5,r"$%s$" %(a),fontsize=30,color="green")
plt.show()
<час>

enter image description here

1
ответ дан 2 December 2019 в 20:15
поделиться

Создание математических формул у Панд.

a = r'\frac{a}{b}'
ax = plt.axes([0,0,0.3,0.3]) #left,bottom,width,height
ax.set_xticks([])
ax.set_yticks([])
ax.axis('off')
plt.text(0.4,0.4,'$%s 

enter image description here

a = r'f(x) = \frac{\exp(-x^2/2)}{\sqrt{2*\pi}}'
ax = plt.axes([0,0,0.3,0.3]) #left,bottom,width,height
ax.set_xticks([])
ax.set_yticks([])
ax.axis('off')
plt.text(0.4,0.4,'$%s 

enter image description here

%a,size=50,color="green")

enter image description here

%a,size=50,color="green")

enter image description here

a = r'f(x) = \frac{\exp(-x^2/2)}{\sqrt{2*\pi}}'
ax = plt.axes([0,0,0.3,0.3]) #left,bottom,width,height
ax.set_xticks([])
ax.set_yticks([])
ax.axis('off')
plt.text(0.4,0.4,'$%s 

enter image description here

%a,size=50,color="green")

enter image description here

0
ответ дан 2 December 2019 в 20:15
поделиться
Другие вопросы по тегам:

Похожие вопросы: