I've been trying to help my wife with a ternary diagram that she needs for her master thesis, but I'm having unexpected trouble with pgfplots. The following code, which I got from an answer from Christian Feuersänger himself is not working properly for me. Instead of producing the expected result

enter image description here

It's producing

enter image description here

from a copy/paste of the code (running MacTeX 2015, with pdfLaTeX). Changing \pgfplotsset{compat=1.12} to \pgfplotsset{compat=newest} (1.13) does not have any effects.

For convencience, here's the code:


    axis on top,
    point meta=\thisrow{C}
] table{
     X Y Z C
     0 0 1  100
     1 0 0  0
     0.5 0.5 0  0

     0.5 0.5 0  0
     0 1 0  20
     0 0 1 100

Any ideas?

Edit: here the result of \listfiles

*File List*
standalone.cls    2015/07/15 v1.2 Class to compile TeX sub-files standalone
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
standalone.cfg    2015/07/15 v1.2 Default configuration file for 'standalone' c
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
pgfplots.sty    2016/01/06 v1.13 Data Visualization (1.13)
    tikz.sty    2015/08/07 v3.0.1a (rcs-revision 1.151)
     pgf.sty    2015/08/07 v3.0.1a (rcs-revision 1.15)
  pgfrcs.sty    2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
 pgfcore.sty    2010/04/11 v3.0.1a (rcs-revision 1.7)
graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
  pgfsys.sty    2014/07/09 v3.0.1a (rcs-revision 1.48)
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
pgfcomp-version-0-65.sty    2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.1a (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.1a (rcs-revision 1.25)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live

My MacTeX 2015 installation is updated daily with CTAN.

  • I get the correct result and the same file list (I think). Just to make sure, can you copy the code from your question back to a new file in a clean directory and recompile? Try also compiling from the command line with TEXMFHOME=/nodirectoryhere pdflatex <filename>.tex. (If for some reason you have a directory called nodirectoryhere at the root level, change the name to something else.) If that still gives the wrong result, can you post the .log file somewhere? – cfr Apr 2 '16 at 1:56
  • New dry runs, from a clean folder with just the tex file, executed neatly from the terminal, either with \pgfplotsset{compat=1.12} or \pgfplotsset{compat=newest}, with the engines: pdflatex, xelatex and luatex. All aux files erased between runs. Still the same… I'm starting to think it is system related, I have an older MacBook, stuck on OS X 10.7.5, but as far as I know, there should be no trouble of this kind in the TeX world. Log files were all clean, no errors, not even a warning in any of the runs. – Osmar Tormena Junior Apr 2 '16 at 3:39
  • 2
    Maybe it is just a problem with the PDF viewer. What program are you using in which version? – Stefan Pinnow Apr 2 '16 at 5:48
  • Apple's Preview 5.5.3 (719.31), which comes with OS X. I'll try and get another to see if it makes a difference. I'll post the response soon. – Osmar Tormena Junior Apr 2 '16 at 14:57
  • Thanks guys! It would appear the built-in preview app is lacking some features. A freshly installed Adobe Reader 10.1 "solved the problem". – Osmar Tormena Junior Apr 2 '16 at 15:14

The question was answered. This is not related to TeX or even pgfplots, but to the built-in Preview app in OS X 10.7.5 (Lion) which I'm stuck. Using a newer PDF Viewer solves the problem.

Thank you all for your time and suggestions!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.