我想用 pgfplots 绘制一些这样的数据:
t s
0 1.00000000000000e(-5)
4.61757198763792e(-16) 1.00000000647317e(-5)
9.23514397527583e(-16) 1.00000001356562e(-5)
3.23230039134654e(-15) 1.00000005831684e(-5)
5.54108638516550e(-15) 1.00000011854923e(-5)
1.70850163542603e(-14) 1.00000065190426e(-5)
2.86289463233551e(-14) 1.00000157217943e(-5)
8.63485961688291e(-14) 1.00001197341306e(-5)
1.44068246014303e(-13) 1.00003202774067e(-5)
4.32666495241673e(-13) 1.00027597798202e(-5)
7.21264744469043e(-13) 1.00075385248608e(-5)
1.21257733711233e(-12) 1.00205586934983e(-5)
1.70388992975561e(-12) 1.00379556373569e(-5)
.dat文件的名字是data.dat,代码如下:
\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{pgfplots}
\pagestyle{empty}
\usepackage{xcolor}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=Q Series,
ylabel=P Values]
\addplot [color=black,y=s, x=t] table {data.dat};
\end{axis}
\end{tikzpicture}
\end{document}
我收到此错误:
Missing number, treated as zero. ...[color=black,y=s, x=t] table {data.dat};
如果我将“e”改为“*10^”,则会得到以下结果:
Package PGF Math Error: Could not parse input '1.00000000000000*10^(-5)' as a floating point number, sorry. The unreadable part was near '*10^(-5)'.. ...[color=black,y=s, x=t] table {data.dat};
有谁知道我做不好什么吗?