我在打印论文时注意到,有些虚线没有出现在硬拷贝上。以下是我打印后得到的结果:
它看起来应该是这样的:
我在某处有另一个包含多条虚线的图形,其中一些显示出来,而另一些则不显示。我可以通过先将文件打印到 PDF 打印机,然后再打印来解决此问题那请改用 PDF。
为什么会发生这种情况?问题的范围是什么?它是否超出了 TikZ?现在我知道 TikZ 图形打印不可靠,不得不重新检查我打印的 100 页论文的每一平方英寸,这真是令人沮丧。
编辑:这是该图的代码。
\documentclass[letterpaper,12pt,titlepage,oneside,final]{book}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.markings}
\usepackage{amsmath,amssymb,amstext} % Lots of math symbols and environments
\begin{document}
\begin{figure}[ht]
\centering
\scalebox{1}{%
\begin{tikzpicture}
\draw[<->] (-6,0) -- (6,0) node[right] {$y$};
\draw[->] (0,3) -- (0,4) node[above] {$f_k(y)$};
\draw[dotted] (0,0) -- (0,3);
\draw[very thick,domain=-3:3,samples=200] plot (\x,{0.5+2.5*exp(-abs(\x))});
\draw[very thick] (-5,0.6245) -- (-2.98,0.6245);
\draw[very thick] (5, 0.6245) -- (2.98,0.6245);
\draw[very thick] (-5,0.6245) -- (-5,0);
\draw[very thick] (5,0.6245) -- (5,0);
\draw[thick,dashed] (-3,1) -- (-3,-0.25) node[below] {$-Y_k$};
\draw[thick,dashed] (3,1) -- (3,-0.25) node[below] {$Y_k$};
\draw[thick,dashed] (-5,1) -- (-5,-0.25) node[below] {$-A_k$};
\draw[thick,dashed] (5,1) -- (5,-0.25) node[below] {$A_k$};
\draw[thick,dashed] (0,0) -- (0,-0.25) node[below] {$0$};
\draw (0.5,0.5) to[in=270,out=90] (3,3) node[above] {inliers};
\draw (4,0.3) to[in=270,out=90] (5,1.75) node[above] {outliers};
\draw (-4,0.3) to[in=270,out=90] (-3,1.75) node[above] {outliers};
\end{tikzpicture}}
\caption{\label{fig:lptcm}%
Schematic plot of $f_k(y)$}
\end{figure}
\end{document}