翻译褪色线时 Tikz 尺寸太大

翻译褪色线时 Tikz 尺寸太大

在大型 TikZ 绘图中,我想添加淡入淡出的片段遇到了问题。

我绘画的这部分效果很好

\documentclass[margin=3cm]{standalone}

\usepackage{tikz}
\usetikzlibrary{fadings}

\begin{document}
\begin{tikzpicture}

\begin{scope}[shift={(30, 0)}]
\draw (0,0) -- (0,1);
\end{scope}

\end{tikzpicture}
\end{document}

但是,如果我像这样给片段添加淡入淡出效果

\documentclass[margin=3cm]{standalone}

\usepackage{tikz}
\usetikzlibrary{fadings}

\begin{document}
\begin{tikzpicture}

\begin{scope}[shift={(30, 0)}]
\draw [path fading=north] (0,0) -- (0,1);
\end{scope}

\end{tikzpicture}
\end{document}

然后我收到错误

! Dimension too large. I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.

我怎样才能为我的片段添加淡入淡出效果?


现在,如果我不移动线条,我也不会收到错误消息,但这需要移动图像中的所有其他内容,而我宁愿不这样做。

相关内容