how to add tex to octave graph

泪湿孤枕 提交于 2019-12-22 14:59:22

问题


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');

回答1:


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



来源:https://stackoverflow.com/questions/9075575/how-to-add-tex-to-octave-graph

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!