如何将 tex 添加到八度图
我有一个条形图,我使用 text() 在每个条形上方显示分数。例如:
text(1, 20, "300/400")
在位置(1,20)处显示字符串“300/400”。
我现在想美化分数,使“300”出现在“400”之上:
300
---
400
有没有办法做到这一点,例如使用 tex 或乳胶?
我尝试了其中的每一个,但口译员没有被调用:
text(1, 20, '\frac{300}{400}');
text(1, 20, '\frac{300}{400}', 'interpreter', 'tex');
text(1, 20, '\frac{300}{400}', 'interpreter', 'latex');
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")
displays the string "300/400" at position (1,20).
I would now like to prettify the fractions so that "300" appears over the "400":
300
---
400
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');
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来在 Octave 中还不可能。 TeX 解释器不支持 \frac 结构,并且 LaTeX 解释器尚未实现。
http://www.network-theory.co.uk/docs/octave3 /octave_172.html
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