1

I use pgfplots to draw a black-white array resembling imshow() in MATLAB.

I use the following code (from Plot a matrix of real values with TikZ/PGF like imshow in matlab ) to do it

\begin{tikzpicture}[scale=0.3]
    \begin{axis}[x=4mm,y=4mm,xtick=\empty,ytick=\empty,colormap={bw}{gray(0cm)=(0); gray(1cm)=(1)}]
    \addplot[scatter,scatter src=explicit,
             only marks, mark=square*,mark size=2mm]
             table[x=x,y=y,meta=l] {datafile.txt};
    \end{axis}
\end{tikzpicture}

But if the blocks are all black, the boundary line between them disappears. I want the boundary line to be more apparent. How can I do that?

I have problem posing image, see

enter image description here

for an example.

demon386
  • 11
  • 2

0 Answers0