gnuplot(epslatex端子)的轴标签中的数学运算格式不正确 [英] math in axes labels for gnuplot (epslatex terminal) not formatted correctly

查看:83
本文介绍了gnuplot(epslatex端子)的轴标签中的数学运算格式不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在gnuplot(v 5.0)中使用以下脚本来生成图形

Using the following script in gnuplot (v 5.0) to generate a graph

set terminal epslatex

unset key

set xlabel "$\zeta$"
set ylabel "$\rho$"

set output "strange_graph.tex"

plot sin(x)

set terminal wxt
set o

以及包含它的乳胶文档,

along with a latex document to include it,

\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}

\begin{figure}
    \begin{center}
        \include{strange_graph}
    \end{center}
\end{figure}

\end{document}

希腊字母rho和zeta没有出现在轴上,而且r从y轴上消失了,留下了"ho".

the Greek letters rho and zeta do not appear on the axes, and furthermore r has disappeared from the y-axis, leaving "ho".

如何解决此问题,怎么回事?

How do I fix this problem, and what is going on?

(不,请不要问我一张图片,显然我没有足够的声誉上载图片.)

(And no, please don't ask me for an image, apparently I don't have enough reputation to upload one.)

推荐答案

使用双引号时,您必须转义反斜杠,

You must either escape the backslashes, when using double quotes,

set xlabel "$\\zeta$"
set ylabel "$\\rho$"

或使用单引号

set xlabel '$\zeta$'
set ylabel '$\rho$'

这篇关于gnuplot(epslatex端子)的轴标签中的数学运算格式不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆