如何在 pgfplots 中绘制未完成的数据点栏?

如何在 pgfplots 中绘制未完成的数据点栏?

我想展示一些实验比较。其中一个候选实验(SHJ)运行时间太长。有人能给我一些关于如何在条形图中显示此类数据点的建议吗?提前谢谢。

\documentclass{minimal}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usetikzlibrary{patterns}
\pgfplotsset{compat=1.7}
\begin{document}
\pgfplotstableread{
dataset ptsj    shj pretti  pplus   ptsj-meta   shj-meta    pretti-meta pplus-meta
flickr  1093    86400   343.4222446 302.8254    3.6x    nan 1.1x    1.0x
orkut   5238    86400   14400   1333.03325  3.9x    nan 10.8x   1.0x
twitter 1671    6051    16213.23523 15046.2471  1.0x    3.6x    9.7x    9.0x
webbase 242.88  2679.67 1703    695 1.0x    11.0x   7.0x    2.9x
}\realdata


\begin{tikzpicture}
\begin{axis}[
    height=6cm,
    width=1\columnwidth,
    ybar,
    ymax=50000,
    enlarge x limits=0.15,
    symbolic x coords={flickr,orkut,twitter,webbase},
    xtick={flickr,orkut,twitter,webbase},
    ymode=log,
    y label style={at={(0.05,0.5)}},
    ylabel=elapsed time (s),
    %x tick label style={rotate=25,anchor=east},
    bar width=8pt,
    legend style={at={(0.5,-0.15)},
anchor=north,legend columns=-1},
nodes near coords,
point meta=explicit symbolic,
every node near coord/.append style={rotate=90, anchor=west},
after end axis/.code={
\node[anchor=west] at (rel axis cs:0,1.05){$>10^5$};
\node[anchor=west] at (rel axis cs:0.25,1.05){$>10^5$};
},
    %cycle list name=exotic,
]
\addplot[draw=black,pattern color=black,pattern=horizontal lines] table[x=dataset,y=shj, meta=shj-meta] {\realdata};
\addplot[draw=black,pattern color=blue,pattern=north east lines] table[x=dataset,y=pretti,meta=pretti-meta] {\realdata};
\addplot[draw=black,pattern color=gray,pattern=crosshatch dots] table[x=dataset,y=ptsj, meta=ptsj-meta] {\realdata};
\addplot[draw=black,pattern color=white] table[x=dataset,y=pplus,meta=pplus-meta] {\realdata};

\legend{SHJ, PRETTI, PTSJ, PRETTI+}
\end{axis}
\end{tikzpicture}
\end{document} 

在此处输入图片描述

相关内容