此 tikz 的尺寸太大。如何解决?

此 tikz 的尺寸太大。如何解决?

我正在使用 MATLAB 绘制一些图形,然后使用matlab2tikz()这些 MATLAB 图形转换为 tikz。我现在遇到的问题是,将其中一个图形转换为 tikz 后,由于维度太大的错误而无法编译。我想知道有哪些方法可以解决这个问题。我在 MATLAB 中展示了我的图形。不幸的是,Tex stack exchange 不允许我发布超过 30000 个字符,因此我无法上传我的长代码。

在此处输入图片描述

如果无法解决这个问题,那么我希望有人能为我绘制这张图表并附上图例,我将非常感激。


更新:我认为最好显示可能导致此错误的域:

width=4.521in,
height=3.566in,
at={(0.758in,0.481in)},
scale only axis,
xmin=-60,
xmax=60,
xlabel style={font=\color{white!15!black}},
xlabel={f (Hz)},
ymin=-9e-06,
ymax=9e-06,
ylabel style={font=\color{white!15!black}},
ylabel={X, H in uHz},
axis background/.style={fill=white},
axis x line*=bottom,
axis y line*=left,
legend style={legend cell align=left, align=left, draw=white!15!black}

更新 2:由于我裁剪太多,所以实际上在图表中看不到,但在 y 轴顶部显示的是 8x10^-6。


更新 3:为了进一步阐明此图,我希望将此信号的图放大到微赫兹的几分之一。这是通过使用两个 MATLAB 命令完成的:

ylim([0 1E-6])  %Displays y-axis in order of 10^-6
set(gca, 'YLim',[-9E-6  9e-6])   %graphs from -9x10^-6 to 9x10^-6

更新 4:我已将我的代码粘贴到 Overleaf 上,这些是我收到的确切错误:

Compile Error. Sorry, your LaTeX code couldn't compile for some reason. Please check the errors below for details, or view the raw log.
 main.tex, line 2226
Dimension too large.

<recently read> \pgf@yy 
                        
l.2226 \end{axis}
                 
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.

 main.tex, line 2226
Dimension too large.

\pgfusepath ...@y by.5\pgflinewidth \ifdim \pgf@y 
                                                  >\pgf@picmaxy \global \pgf...
l.2226 \end{axis}
                 
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.

 main.tex, line 2226
Dimension too large.

\pgf@transformcm ...\pgf@x \global \pgf@y =\pgf@y 
                                                  \xdef \pgf@tempaa {\pgf@sy...
l.2226 \end{axis}
                 
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.

 main.tex, line 2226
Dimension too large.

<argument> \pgf@y 
                  
l.2226 \end{axis}
                 
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.

 main.tex, line 2226
Dimension too large.

<recently read> \pgf@y 
                       
l.2226 \end{axis}
                 
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.

 main.tex, line 2226
Dimension too large.

<argument> \pgf@y 
                  
l.2226 \end{axis}
                 
(That makes 100 errors; please try again.) 
Here is how much of TeX's memory you used:
 26385 strings out of 480906
 656043 string characters out of 5908280
 1585782 words of memory out of 5000000
 41557 multiletter control sequences out of 15000+600000
 535088 words of font info for 29 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 74i,9n,127p,718b,1842s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

最后更新:这是 tikz 代码的链接(不含主文档和包):

https://docs.google.com/document/d/1QarQN-31eMwIvIx67GbW5YQOoq0tkN5G3ptctUYgu1o/edit?usp=sharing



相关内容