Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I tried to compile the example in How to combine fill and pattern in a pgfplot bar plot? to answer the question here PGFplots ybar patterns not showing and the pattern doesn't appear when I use lualatex xelatex or pdflatex; it only works with latex+dvipdf. I have PGF 2.10 and PGFplots 1.8. Is there any known bug and workaround here?

I tried this code:

\documentclass[12pt]{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{patterns}


\begin{document}
\begin{tikzpicture}
\begin{axis}[ybar, samples=10, enlarge y limits=upper, ymin=0]
\addplot +[
    black,
    fill=yellow,
    postaction={
        pattern=north east lines
    }
]{rnd};
\end{axis}

\end{tikzpicture}
\end{document}

The result with pdflatex:

enter image description here

The result with latex+dvipdf:

enter image description here

The only warning that appears is

Package pgfplots Warning: running in backwards compatibility mode (unsuitable t ick labels; missing features). Consider writing \pgfplotsset{compat=1.8} into y our preamble.

By the way, I am not sure, but in one of my tests, it seemed that if I had only none bar, it worked.

share|improve this question

closed as off-topic by egreg, Joseph Wright Nov 2 '13 at 22:48

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Unfortunately, xelatex doesn't support patterns. About lualatex I have no idea. –  Gonzalo Medina May 31 '13 at 16:01
1  
@GonzaloMedina your comment is no longer true: the unstable of PGF supports patterns in xelatex (can be downloaded from texample.net). But pdflatex should have worked; it is supposed to be the best-supported driver. –  Christian Feuersänger May 31 '13 at 20:17
1  
@ChristianFeuersänger Good to know. Thank you. Do you know when this unstable version will be the stable one? –  Gonzalo Medina May 31 '13 at 20:23
1  
@cacamailg could you provide the resulting pdf somewhere? Perhaps it really is corrupted somehow. Did you modify the mentioned source code somehow? Did you get error messages? Ah, and note that you need to configure a special driver for PGF in order to use xelatex (please inspect the manual for details; I don't have it at hand now) –  Christian Feuersänger Jun 1 '13 at 14:33
1  
This question appears to be off-topic because it is about a problem solved by updating the software –  egreg Nov 2 '13 at 22:47