我正在尝试绘制特定形状的温度图。对于较少的元素(少于 3000),我没有问题,但对于过多的元素(超过 250k),我无法生成文件。从这些中,我希望大约 125k 个坐标可点击。我收到错误TeX capacity exceeded, sorry [token memory size=75830065].
,并且该过程需要 10 多分钟。我正在使用 LuaLaTeX。
这是我当前的代码
\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{clickable,colormaps}
\pgfplotsset{
%colormap/hsv
colormap={hsv3}{
rgb255=(255,0,0)
rgb255=(127,255,0)
rgb255=(0,255,0)
rgb255=(0,127,255)
rgb255=(0,0,255)
rgb255=(127,0,255)
rgb255=(255,0,255)},
colormap name=hsv3,
annot/point format={(\%d,\%d)}
}
\standaloneenv{tikzpicture}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
x=.15mm,y=.15mm,
ymin=-0.5,ymax=250.5,
xmin=-0.5,xmax=1000.5,
colorbar,
ticks=none
]
\addplot[matrix plot, point meta=explicit,
clickable coords={(xy): \thisrow{t}}
] table[x=x,y=y, meta=t]{temps001.dat};
\end{axis}
\end{tikzpicture}
\end{document}
temps001.dat 包含一个 251x1001 矩阵的数据,其中约 50% 为 nan 值。这是我的日志的一部分
This is LuaTeX, Version 1.09.0 (MiKTeX 2.9.6880) (format=lualatex 2018.11.17) 21 NOV 2018 01:55
restricted system commands enabled.
...
(G:/TeX/MikTeX/texmfs/install/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count133
\scratchdimen=\dimen174
\scratchbox=\box41
\nofMPsegments=\count134
\nofMParguments=\count135
\everyMPshowfont=\toks40
\MPscratchCnt=\count136
\MPscratchDim=\dimen175
\MPnumerator=\count137
\makeMPintoPDFobject=\count138
\everyMPtoPDFconversion=\toks41
) (G:/TeX/MikTeX/texmfs/install/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(G:/TeX/MikTeX/texmfs/install/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
)
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 43
8.
Package grfext Info: Graphics extension search list:
(grfext) [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPEG
,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
)
ABD: EveryShipout initializing macros
Package pgfplots Warning: running in backwards compatibility mode (unsuitable ti
ck labels; missing features). Consider writing \pgfplotsset{compat=1.16} into yo
ur preamble.
on input line 18.
\AtBeginShipoutBox=\box42
Package hyperref Info: Link coloring OFF on input line 18.
(G:/TeX/MikTeX/texmfs/install/tex/latex/hyperref/nameref.sty
Package: nameref 2016/05/21 v2.44 Cross-referencing by name of section
(G:/TeX/MikTeX/texmfs/install/tex/generic/oberdiek/gettitlestring.sty
Package: gettitlestring 2016/05/16 v1.5 Cleanup title references (HO)
)
\c@section@level=\count139
)
LaTeX Info: Redefining \ref on input line 18.
LaTeX Info: Redefining \pageref on input line 18.
LaTeX Info: Redefining \nameref on input line 18.
(./transcal001.out) (./transcal001.out)
\@outlinefile=\write5
\openout5 = transcal001.out
LaTeX Font Info: Try loading font information for U+pzd on input line 18.
(G:/TeX/MikTeX/texmfs/install/tex/latex/psnfss/upzd.fd
File: upzd.fd 2001/06/04 font definitions for U/pzd.
){G:/TeX/MikTeX/texmfs/data/pdftex/config/pdftex.map} (./pgfplotsJS.djs
(G:/TeX/MikTeX/texmfs/install/tex/latex/acrotex/dljscc.def))
PGFPlots: reading {temps001.dat}
Runaway argument?
{ /U << /S/JavaScript/JS(axisMouseUp("clickableplot0", { axisType: "r\ETC.
! TeX capacity exceeded, sorry [token memory size=75830065].
<argument> ...xy): 109.71"],[1.4e1,6.0e0,"(xy): 109.92"]\ETC.
l.30 \end{axis}
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.
Here is how much of LuaTeX's memory you used:
28509 strings out of 494324
8674235,75830065 words of node,token memory allocated 7127492 words of node memory still in use:
9 hlist, 2 rule, 6 dir, 56 glue, 3 kern, 1 glyph, 1018096 attribute, 52 glue_
spec, 1018096 attribute_list, 5 temp, 9 if_stack, 1 write, 1018061 pdf_literal,
3 pdf_refobj, 1 pdf_dest, 2 pdf_colorstack nodes
avail lists: 1:3,2:3,4:3,5:9,6:1,9:8,11:1
31804 multiletter control sequences out of 65536+200000
17 fonts using 653099 bytes
62i,6n,96p,746b,2421s stack positions out of 5000i,500n,10000p,200000b,500000s
! ==> Fatal error occurred, no output PDF file produced!
我的电脑有 8GB 内存、Windows 7、core2quad。我已经尝试编辑由 打开的 lualatex.ini initexmf --edit-config-file=lualatex
。它有:
main_memory=200000000000
pool_size=2000000000
save_size=2000000000
extra_mem_bot=2000000000
extra_mem_top=2000000000
font_mem_size=2000000000
一个好的解决方案是只让非 nan 值(约占所有这些坐标的 50%)可点击。这可能吗?最好停用捕捉到最近特征的功能。我只想在形状的任何地方显示温度。
编辑 1:我使用的是一台带有 g41 主板和 4gb ddr2 的计算机,处理器、硬盘和操作系统相同,有时,当机器什么都不做时(但不一定每次都不做时),代码就会编译。现在我让计算机恢复到当前配置,并且无法运行。
EDIT2:编辑后,lualatex.ini
代码luatex.ini
根本不运行,立即返回相同的错误。经过几次尝试后,它会尝试再次编译