准备

  1. 英文论文写作进入overleaf(paper),中文论文写作进入overleaf(book)。账号需要找我手动添加。
  2. Tikz的简单语法https://www.latexstudio.net/archives/9774.html, 不需要深入了解,会简单修改即可。

原因

尽管很多软件都可以绘制矢量图并存为eps格式,但缺点不少:
1. 所绘制的图不能直接在Latex中修改;时间长了,源图文件常常丢失;
2. 美观度不够;
3. 线型字体可能大小不一,难以量化控制。

另一种途径是采用Tikz,可以直接以写代码的形式绘图,但极其繁琐。

折中的方案

一个折中的方案,步骤如下:
1. Step1: 首先在https://www.mathcha.io/ 中采用GUI形式绘图,可以直接生成Tikz代码。如下图,点击正上方的Tikz按钮即可得到Tikz代码。

Tikz代码为:

begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
省略......
% Text Node
\draw (139,24.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {y};
% Text Node
\draw (476,270.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {\kappa};
% Text Node
\draw (195,41.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {c_{1}};
% Text Node
\draw (180,91.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {c_{2}};
% Text Node
\draw (230,112.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {c_{3}};
% Text Node
\draw (243,157.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {c_{4}};
% Text Node
\draw (212,237.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {c_{5}};
% Text Node
\draw (320,48.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {c_{6}};
% Text Node
\draw (409,35.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {c_{7}};
% Text Node
\draw (402,238.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {c_{8}};
% Text Node
\draw (160,270.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {0};
% Text Node
\draw (437,272.4) node [anchor=north west][inner sep=0.75pt]  [font=\footnotesize]  {1};
\end{tikzpicture}

  1. Step2:将上述代码拷贝到figure代码框中,然后编译。
    \begin{figure}
    此处插入代码
    \end{figure}

  2. Step3:直接修改代码。比如我觉得黑圆点太大,曲线颜色不好看,直接在代码修改:

draw [shift={(452.2,86.73)}, rotate = 0.17] [color=blue!50,draw opacity=1 ][fill=blue!50,fill opacity=1 ][line width=1.5]      (0, 0) circle [x radius= 2, y radius= 2]   ;

颜色

Tikz中默认支持的颜色

颜色混合,例如:
blue!45!red % a blend of 45% of blue and 55% of red

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部