1
라텍스 텍스트로 챠코 플롯을 만들 수 있습니까? 예를 들어, 우리는 this exampe의 제목에 라텍스 기호를 원하는 경우 :Chaco 텍스트의 라텍스?
from traits.api import HasTraits, Instance
from traitsui.api import View, Item
from chaco.api import Plot, ArrayPlotData
from enable.component_editor import ComponentEditor
from numpy import linspace, sin
class LinePlot(HasTraits):
plot = Instance(Plot)
traits_view = View(
Item('plot',editor=ComponentEditor(), show_label=False),
width=500, height=500, resizable=True, title="Chaco Plot")
def __init__(self):
super(LinePlot, self).__init__()
x = linspace(-14, 14, 100)
y = sin(x) * x**3
plotdata = ArrayPlotData(x=x, y=y)
plot = Plot(plotdata)
plot.plot(("x", "y"), type="line", color="blue")
plot.title = "sin(x) * x^3"
self.plot = plot
if __name__ == "__main__":
LinePlot().configure_traits()
내가 아무 소용 $sin(x)^3$
로 제목을 교체했는데, 이것이 가능했던 궁금? 아래의 스크린 샷 :