如何将tex添加到八度图 [英] how to add tex to octave graph
问题描述
我有一个条形图,并且我正在使用text()在每个条形上方显示分数.例如:
I have a bar graph, and I am using text() to display fractions above each of the bars. For example:
text(1, 20, "300/400")
在位置(1,20)显示字符串"300/400".
displays the string "300/400" at position (1,20).
我现在想美化分数,以使"300"出现在"em"上方,而不是"400"之上:
I would now like to prettify the fractions so that "300" appears over the "400":
300
---
400
有没有办法做到这一点,例如使用tex或乳胶?
Is there a way to do this, eg with tex or latex?
我尝试了所有这些方法,但是没有调用解释器:
I tried each of these, but the interpreter is not getting called:
text(1, 20, '\frac{300}{400}');
text(1, 20, '\frac{300}{400}', 'interpreter', 'tex');
text(1, 20, '\frac{300}{400}', 'interpreter', 'latex');
推荐答案
在Octave中似乎还不可能. TeX解释器不支持\ frac结构,并且LaTeX解释器尚未实现.
It looks like it's not yet possible in Octave. The TeX interpreter doesn't support the \frac structure, and the LaTeX interpreter isn't yet implemented.
http://www.network-theory.co.uk/docs/octave3/octave_172.html
这篇关于如何将tex添加到八度图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!