0

I have to draw a contour plot of a large dataset, so I use lualatex as compiler. This example also works with normal latex, i.e. latex+dvips+ps2pdf. It works fine in latex but for the large amount of data I have I require a solution using lualatex.

What I want to do is plot a 2D-contour I read in from some matlab calculations. Since the contour lines are pretty tight, I do not want labels in my plots, but the heights cannot be completely neglected and should be mentioned.

So what I am looking for is either (preferably) a colorbar for the height values or some other kind of legend to display the heights (I am mainly interested in the order of magnitude, not some fancy details here). Alas, colorbar style produces just an empty bar. How can this be done correctly?

Preferrably I would stick to the given data format and not calculate the point meta information myself using any non-standard data-output.

Have a look at my (rather large due to the data) MWE:

\documentclass{article}

\usepackage{pgfplots}
\usepackage{filecontents}
\pgfplotsset{compat=1.10}
\usepgfplotslibrary{colormaps}
\listfiles

\begin{document}

\begin{filecontents*}{contours.txt}
% contours in matlab export format:
% first line: height value | number of points
% empty line: new height contour
% (   -8.000000e-01,  +27) ==> contour '   -8.000000e-01', consists of 27 points
% first line is reserved for height value and number of values
       -8.000000e-01     +2.700000e+01
       +9.298664e-01     +3.100000e+00
       +9.425839e-01     +3.000000e+00
       +9.698291e-01     +2.900000e+00
       +1.000000e+00     +2.829558e+00
       +1.015251e+00     +2.800000e+00
       +1.087289e+00     +2.700000e+00
       +1.100000e+00     +2.686407e+00
       +1.200000e+00     +2.603061e+00
       +1.204984e+00     +2.600000e+00
       +1.300000e+00     +2.552224e+00
       +1.400000e+00     +2.519138e+00
       +1.500000e+00     +2.501552e+00
       +1.551839e+00     +2.500000e+00
       +1.600000e+00     +2.498741e+00
       +1.612658e+00     +2.500000e+00
       +1.700000e+00     +2.510011e+00
       +1.800000e+00     +2.536488e+00
       +1.900000e+00     +2.579387e+00
       +1.934295e+00     +2.600000e+00
       +2.000000e+00     +2.648558e+00
       +2.052969e+00     +2.700000e+00
       +2.100000e+00     +2.759507e+00
       +2.125867e+00     +2.800000e+00
       +2.171795e+00     +2.900000e+00
       +2.200000e+00     +2.997366e+00
       +2.200652e+00     +3.000000e+00
       +2.212428e+00     +3.100000e+00
% (   -6.000000e-01,  +36) ==> contour '   -6.000000e-01', consists of 36 points
% first line is reserved for height value and number of values
       -6.000000e-01     +3.600000e+01
       +6.450855e-01     +3.100000e+00
       +6.520548e-01     +3.000000e+00
       +6.669855e-01     +2.900000e+00
       +6.906688e-01     +2.800000e+00
       +7.000000e-01     +2.771533e+00
       +7.265882e-01     +2.700000e+00
       +7.765533e-01     +2.600000e+00
       +8.000000e-01     +2.563254e+00
       +8.478595e-01     +2.500000e+00
       +9.000000e-01     +2.444816e+00
       +9.521974e-01     +2.400000e+00
       +1.000000e+00     +2.365752e+00
       +1.100000e+00     +2.309798e+00
       +1.122826e+00     +2.300000e+00
       +1.200000e+00     +2.271037e+00
       +1.300000e+00     +2.243961e+00
       +1.400000e+00     +2.226175e+00
       +1.500000e+00     +2.216722e+00
       +1.600000e+00     +2.215114e+00
       +1.700000e+00     +2.221269e+00
       +1.800000e+00     +2.235502e+00
       +1.900000e+00     +2.258563e+00
       +2.000000e+00     +2.291738e+00
       +2.019028e+00     +2.300000e+00
       +2.100000e+00     +2.340503e+00
       +2.190532e+00     +2.400000e+00
       +2.200000e+00     +2.407411e+00
       +2.294865e+00     +2.500000e+00
       +2.300000e+00     +2.506214e+00
       +2.364773e+00     +2.600000e+00
       +2.400000e+00     +2.666529e+00
       +2.415326e+00     +2.700000e+00
       +2.450228e+00     +2.800000e+00
       +2.474706e+00     +2.900000e+00
       +2.490138e+00     +3.000000e+00
       +2.497341e+00     +3.100000e+00
% (   -4.000000e-01,  +47) ==> contour '   -4.000000e-01', consists of 47 points
% first line is reserved for height value and number of values
       -4.000000e-01     +4.700000e+01
       +4.121411e-01     +3.100000e+00
       +4.162488e-01     +3.000000e+00
       +4.250489e-01     +2.900000e+00
       +4.390079e-01     +2.800000e+00
       +4.589111e-01     +2.700000e+00
       +4.859784e-01     +2.600000e+00
       +5.000000e-01     +2.559536e+00
       +5.233061e-01     +2.500000e+00
       +5.739589e-01     +2.400000e+00
       +6.000000e-01     +2.359249e+00
       +6.448749e-01     +2.300000e+00
       +7.000000e-01     +2.241668e+00
       +7.485041e-01     +2.200000e+00
       +8.000000e-01     +2.163065e+00
       +9.000000e-01     +2.106929e+00
       +9.154680e-01     +2.100000e+00
       +1.000000e+00     +2.066755e+00
       +1.100000e+00     +2.036846e+00
       +1.200000e+00     +2.014678e+00
       +1.292516e+00     +2.000000e+00
       +1.300000e+00     +1.998903e+00
       +1.400000e+00     +1.988971e+00
       +1.500000e+00     +1.983693e+00
       +1.600000e+00     +1.982795e+00
       +1.700000e+00     +1.986232e+00
       +1.800000e+00     +1.994179e+00
       +1.845915e+00     +2.000000e+00
       +1.900000e+00     +2.007387e+00
       +2.000000e+00     +2.026780e+00
       +2.100000e+00     +2.053259e+00
       +2.200000e+00     +2.088613e+00
       +2.225761e+00     +2.100000e+00
       +2.300000e+00     +2.137725e+00
       +2.393978e+00     +2.200000e+00
       +2.400000e+00     +2.204738e+00
       +2.497559e+00     +2.300000e+00
       +2.500000e+00     +2.302942e+00
       +2.567519e+00     +2.400000e+00
       +2.600000e+00     +2.460471e+00
       +2.618401e+00     +2.500000e+00
       +2.655260e+00     +2.600000e+00
       +2.682907e+00     +2.700000e+00
       +2.700000e+00     +2.783521e+00
       +2.703086e+00     +2.800000e+00
       +2.716685e+00     +2.900000e+00
       +2.725258e+00     +3.000000e+00
       +2.729260e+00     +3.100000e+00
% (   -2.000000e-01,  +55) ==> contour '   -2.000000e-01', consists of 55 points
% first line is reserved for height value and number of values
       -2.000000e-01     +5.500000e+01
       +2.015527e-01     +3.100000e+00
       +2.034614e-01     +3.000000e+00
       +2.075505e-01     +2.900000e+00
       +2.140368e-01     +2.800000e+00
       +2.232852e-01     +2.700000e+00
       +2.358626e-01     +2.600000e+00
       +2.526312e-01     +2.500000e+00
       +2.749154e-01     +2.400000e+00
       +3.000000e-01     +2.314760e+00
       +3.049582e-01     +2.300000e+00
       +3.472067e-01     +2.200000e+00
       +4.000000e-01     +2.110448e+00
       +4.074905e-01     +2.100000e+00
       +5.000000e-01     +2.001149e+00
       +5.013777e-01     +2.000000e+00
       +6.000000e-01     +1.933295e+00
       +6.678578e-01     +1.900000e+00
       +7.000000e-01     +1.886642e+00
       +8.000000e-01     +1.853701e+00
       +9.000000e-01     +1.829264e+00
       +1.000000e+00     +1.810904e+00
       +1.078017e+00     +1.800000e+00
       +1.100000e+00     +1.797166e+00
       +1.200000e+00     +1.787170e+00
       +1.300000e+00     +1.780034e+00
       +1.400000e+00     +1.775346e+00
       +1.500000e+00     +1.772854e+00
       +1.600000e+00     +1.772430e+00
       +1.700000e+00     +1.774053e+00
       +1.800000e+00     +1.777804e+00
       +1.900000e+00     +1.783883e+00
       +2.000000e+00     +1.792627e+00
       +2.062975e+00     +1.800000e+00
       +2.100000e+00     +1.804674e+00
       +2.200000e+00     +1.820992e+00
       +2.300000e+00     +1.842670e+00
       +2.400000e+00     +1.871696e+00
       +2.473804e+00     +1.900000e+00
       +2.500000e+00     +1.911733e+00
       +2.600000e+00     +1.969658e+00
       +2.639606e+00     +2.000000e+00
       +2.700000e+00     +2.058423e+00
       +2.733790e+00     +2.100000e+00
       +2.794742e+00     +2.200000e+00
       +2.800000e+00     +2.210974e+00
       +2.836362e+00     +2.300000e+00
       +2.866601e+00     +2.400000e+00
       +2.889144e+00     +2.500000e+00
       +2.900000e+00     +2.562435e+00
       +2.905958e+00     +2.600000e+00
       +2.918372e+00     +2.700000e+00
       +2.927500e+00     +2.800000e+00
       +2.933901e+00     +2.900000e+00
       +2.937937e+00     +3.000000e+00
       +2.939821e+00     +3.100000e+00
% (   +0.000000e+00,  +47) ==> contour '   +0.000000e+00', consists of 47 points
% first line is reserved for height value and number of values
       +0.000000e+00     +4.700000e+01
       +0.000000e+00     +3.100000e+00
       +0.000000e+00     +3.000000e+00
       +0.000000e+00     +2.900000e+00
       +0.000000e+00     +2.800000e+00
       +0.000000e+00     +2.700000e+00
       +0.000000e+00     +2.600000e+00
       +0.000000e+00     +2.500000e+00
       +0.000000e+00     +2.400000e+00
       +0.000000e+00     +2.300000e+00
       +0.000000e+00     +2.200000e+00
       +0.000000e+00     +2.100000e+00
       +0.000000e+00     +2.000000e+00
       +0.000000e+00     +1.900000e+00
       +0.000000e+00     +1.800000e+00
       +0.000000e+00     +1.700000e+00
       +0.000000e+00     +1.600000e+00
       +1.000000e-01     +1.570782e+00
       +2.000000e-01     +1.570782e+00
       +3.000000e-01     +1.570782e+00
       +4.000000e-01     +1.570782e+00
       +5.000000e-01     +1.570782e+00
       +6.000000e-01     +1.570782e+00
       +7.000000e-01     +1.570782e+00
       +8.000000e-01     +1.570782e+00
       +9.000000e-01     +1.570782e+00
       +1.000000e+00     +1.570782e+00
       +1.100000e+00     +1.570782e+00
       +1.200000e+00     +1.570782e+00
       +1.300000e+00     +1.570782e+00
       +1.400000e+00     +1.570782e+00
       +1.500000e+00     +1.570782e+00
       +1.600000e+00     +1.570782e+00
       +1.700000e+00     +1.570782e+00
       +1.800000e+00     +1.570782e+00
       +1.900000e+00     +1.570782e+00
       +2.000000e+00     +1.570782e+00
       +2.100000e+00     +1.570782e+00
       +2.200000e+00     +1.570782e+00
       +2.300000e+00     +1.570782e+00
       +2.400000e+00     +1.570782e+00
       +2.500000e+00     +1.570782e+00
       +2.600000e+00     +1.570782e+00
       +2.700000e+00     +1.570782e+00
       +2.800000e+00     +1.570782e+00
       +2.900000e+00     +1.570782e+00
       +3.000000e+00     +1.570782e+00
       +3.100000e+00     +1.570782e+00
% (   +2.000000e-01,  +55) ==> contour '   +2.000000e-01', consists of 55 points
% first line is reserved for height value and number of values
       +2.000000e-01     +5.500000e+01
       +2.013739e-01     +0.000000e+00
       +2.024108e-01     +1.000000e-01
       +2.055740e-01     +2.000000e-01
       +2.110283e-01     +3.000000e-01
       +2.190722e-01     +4.000000e-01
       +2.301799e-01     +5.000000e-01
       +2.450758e-01     +6.000000e-01
       +2.648652e-01     +7.000000e-01
       +2.912697e-01     +8.000000e-01
       +3.000000e-01     +8.265445e-01
       +3.279292e-01     +9.000000e-01
       +3.794935e-01     +1.000000e+00
       +4.000000e-01     +1.030812e+00
       +4.572205e-01     +1.100000e+00
       +5.000000e-01     +1.139929e+00
       +5.850948e-01     +1.200000e+00
       +6.000000e-01     +1.208593e+00
       +7.000000e-01     +1.254717e+00
       +8.000000e-01     +1.288085e+00
       +8.459457e-01     +1.300000e+00
       +9.000000e-01     +1.312486e+00
       +1.000000e+00     +1.330574e+00
       +1.100000e+00     +1.344175e+00
       +1.200000e+00     +1.354255e+00
       +1.300000e+00     +1.361452e+00
       +1.400000e+00     +1.366179e+00
       +1.500000e+00     +1.368692e+00
       +1.600000e+00     +1.369120e+00
       +1.700000e+00     +1.367483e+00
       +1.800000e+00     +1.363700e+00
       +1.900000e+00     +1.357570e+00
       +2.000000e+00     +1.348752e+00
       +2.100000e+00     +1.336711e+00
       +2.200000e+00     +1.320635e+00
       +2.296876e+00     +1.300000e+00
       +2.300000e+00     +1.299258e+00
       +2.400000e+00     +1.269856e+00
       +2.500000e+00     +1.229700e+00
       +2.556082e+00     +1.200000e+00
       +2.600000e+00     +1.171926e+00
       +2.684634e+00     +1.100000e+00
       +2.700000e+00     +1.083425e+00
       +2.761928e+00     +1.000000e+00
       +2.800000e+00     +9.302234e-01
       +2.813832e+00     +9.000000e-01
       +2.850056e+00     +8.000000e-01
       +2.876767e+00     +7.000000e-01
       +2.896787e+00     +6.000000e-01
       +2.900000e+00     +5.796880e-01
       +2.911567e+00     +5.000000e-01
       +2.922530e+00     +4.000000e-01
       +2.930469e+00     +3.000000e-01
       +2.935852e+00     +2.000000e-01
       +2.938974e+00     +1.000000e-01
       +2.939998e+00     +0.000000e+00
% (   +4.000000e-01,  +47) ==> contour '   +4.000000e-01', consists of 47 points
% first line is reserved for height value and number of values
       +4.000000e-01     +4.700000e+01
       +4.117565e-01     +0.000000e+00
       +4.139878e-01     +1.000000e-01
       +4.207952e-01     +2.000000e-01
       +4.325333e-01     +3.000000e-01
       +4.498443e-01     +4.000000e-01
       +4.737488e-01     +5.000000e-01
       +5.000000e-01     +5.827813e-01
       +5.061323e-01     +6.000000e-01
       +5.511144e-01     +7.000000e-01
       +6.000000e-01     +7.828193e-01
       +6.119223e-01     +8.000000e-01
       +6.990859e-01     +9.000000e-01
       +7.000000e-01     +9.008632e-01
       +8.000000e-01     +9.787218e-01
       +8.348187e-01     +1.000000e+00
       +9.000000e-01     +1.034207e+00
       +1.000000e+00     +1.074902e+00
       +1.081170e+00     +1.100000e+00
       +1.100000e+00     +1.105225e+00
       +1.200000e+00     +1.126776e+00
       +1.300000e+00     +1.142162e+00
       +1.400000e+00     +1.152270e+00
       +1.500000e+00     +1.157642e+00
       +1.600000e+00     +1.158556e+00
       +1.700000e+00     +1.155058e+00
       +1.800000e+00     +1.146970e+00
       +1.900000e+00     +1.133864e+00
       +2.000000e+00     +1.115011e+00
       +2.059572e+00     +1.100000e+00
       +2.100000e+00     +1.088708e+00
       +2.200000e+00     +1.052542e+00
       +2.300000e+00     +1.004495e+00
       +2.307658e+00     +1.000000e+00
       +2.400000e+00     +9.361881e-01
       +2.441528e+00     +9.000000e-01
       +2.500000e+00     +8.377354e-01
       +2.529339e+00     +8.000000e-01
       +2.590982e+00     +7.000000e-01
       +2.600000e+00     +6.816485e-01
       +2.635009e+00     +6.000000e-01
       +2.667752e+00     +5.000000e-01
       +2.692168e+00     +4.000000e-01
       +2.700000e+00     +3.566031e-01
       +2.709394e+00     +3.000000e-01
       +2.720829e+00     +2.000000e-01
       +2.727461e+00     +1.000000e-01
       +2.729635e+00     +0.000000e+00
% (   +6.000000e-01,  +38) ==> contour '   +6.000000e-01', consists of 38 points
% first line is reserved for height value and number of values
       +6.000000e-01     +3.800000e+01
       +6.444328e-01     +0.000000e+00
       +6.482186e-01     +1.000000e-01
       +6.597684e-01     +2.000000e-01
       +6.796837e-01     +3.000000e-01
       +7.000000e-01     +3.699459e-01
       +7.098511e-01     +4.000000e-01
       +7.539780e-01     +5.000000e-01
       +8.000000e-01     +5.788139e-01
       +8.145836e-01     +6.000000e-01
       +9.000000e-01     +6.981460e-01
       +9.019755e-01     +7.000000e-01
       +1.000000e+00     +7.760325e-01
       +1.039656e+00     +8.000000e-01
       +1.100000e+00     +8.312433e-01
       +1.200000e+00     +8.705182e-01
       +1.300000e+00     +8.985591e-01
       +1.307662e+00     +9.000000e-01
       +1.400000e+00     +9.156823e-01
       +1.500000e+00     +9.247248e-01
       +1.600000e+00     +9.262632e-01
       +1.700000e+00     +9.203755e-01
       +1.800000e+00     +9.067609e-01
       +1.831263e+00     +9.000000e-01
       +1.900000e+00     +8.834369e-01
       +2.000000e+00     +8.490788e-01
       +2.100000e+00     +8.021655e-01
       +2.103683e+00     +8.000000e-01
       +2.200000e+00     +7.333510e-01
       +2.238255e+00     +7.000000e-01
       +2.300000e+00     +6.342651e-01
       +2.326662e+00     +6.000000e-01
       +2.388279e+00     +5.000000e-01
       +2.400000e+00     +4.753975e-01
       +2.431225e+00     +4.000000e-01
       +2.461581e+00     +3.000000e-01
       +2.482165e+00     +2.000000e-01
       +2.494103e+00     +1.000000e-01
       +2.498016e+00     +0.000000e+00
% (   +8.000000e-01,  +27) ==> contour '   +8.000000e-01', consists of 27 points
% first line is reserved for height value and number of values
       +8.000000e-01     +2.700000e+01
       +9.286755e-01     +0.000000e+00
       +9.355837e-01     +1.000000e-01
       +9.566595e-01     +2.000000e-01
       +9.930007e-01     +3.000000e-01
       +1.000000e+00     +3.134802e-01
       +1.054472e+00     +4.000000e-01
       +1.100000e+00     +4.538252e-01
       +1.149931e+00     +5.000000e-01
       +1.200000e+00     +5.368432e-01
       +1.300000e+00     +5.905824e-01
       +1.326241e+00     +6.000000e-01
       +1.400000e+00     +6.223554e-01
       +1.500000e+00     +6.385605e-01
       +1.600000e+00     +6.413175e-01
       +1.700000e+00     +6.307660e-01
       +1.800000e+00     +6.063674e-01
       +1.816499e+00     +6.000000e-01
       +1.900000e+00     +5.616013e-01
       +1.993790e+00     +5.000000e-01
       +2.000000e+00     +4.948996e-01
       +2.088383e+00     +4.000000e-01
       +2.100000e+00     +3.833321e-01
       +2.147170e+00     +3.000000e-01
       +2.185790e+00     +2.000000e-01
       +2.200000e+00     +1.369073e-01
       +2.207134e+00     +1.000000e-01
       +2.213531e+00     +0.000000e+00\end{filecontents*}

    \begin{tikzpicture}
        \begin{axis}[colorbar, colormap/jet, colorbar horizontal]

            \addplot
                [
                contour prepared,
                contour prepared format=matlab,
                /pgfplots/contour/labels=false,
                ]
                table {contours.txt};
        \end{axis}
    \end{tikzpicture}
\end{document}

which produces the output shown below (red ellipsoid to mark the problematic area not part of pgfplots output) rendered mw-example

Update 1

Based on comments and discussion below, I am led to think this is a problem of the version of pgfplots I am using. Still an update to TeX 3.14159265 (TeX Live 2014/W32TeX) yielded no different results. I suppose that my pgf packages are up to date, but to ensure this I added the \listfiles command in the example above. If you can compile a filled colorbar from my example, I would gladly see the files-part of your log to detect version differences. This is my file list:

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
pgfplots.sty    2014/02/28 v1.10 Data Visualization (1.10-2-gb39fe75)
    tikz.sty    2013/12/13 v3.0.0 (rcs-revision 1.142)
     pgf.sty    2013/12/18 v3.0.0 (rcs-revision 1.14)
  pgfrcs.sty    2013/12/20 v3.0.0 (rcs-revision 1.28)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v3.0.0 (rcs-revision 1.7)
graphicx.sty    2014/04/25 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    2014/05/08 v1.15 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 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)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)
  pgfsys.sty    2013/11/30 v3.0.0 (rcs-revision 1.47)
  pgfsys.code.tex
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
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.0 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.0 (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.0 (rcs-revision 1.25)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
filecontents.sty    2011/10/08 v1.3 Create an external file from within a LaTeX 
document
supp-pdf.mkii
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
 ***********

I have read elsewhere that for interpolation-shading with lualatex one needs to install the development pgfplots package, which I haven't done(no need for interp-shading czrrently). Maybe this empty colorbar is an additional bug?

  • 1
    It works fine for me using PGFPlots 1.10. What version of PGFPlots are you using? – Jake Jun 22 '14 at 17:21
  • My PGFPlots version also is 1.10. Also, I can get the desired result (for small datasets) using latex+dvips+ps2pdf for compilation. I need a solution for lualatex, though. I'll add this to the original question. – marc Jun 22 '14 at 18:22
  • I get a correct colorbar using lualatex. – Jake Jun 22 '14 at 18:42
  • That's strange. My latex distro is TeXLive 2013. I'm going to try TeXLive 2014 now. – marc Jun 22 '14 at 20:09
  • 1
    Some pdf readers are unable to display gradients, you could try to open your file with another viewer, just to be sure that lualatex is not using something fancy in this colorbar. – TonioElGringo Jun 23 '14 at 8:32
4

This seems to be a viewer issue. In this case, and in case of other unexpected display problems, such as for example color gradients, it's recommendable to check the PDF output with a different PDF viewer. According to OP, this particular example is correctly rendered by some version of Adobe Acrobat and PDF-Xchange.

However, I have no idea why lualatex is not rendering this colorbar the way latex is, if someone has a clue (maybe a different PDF header or page configuration?), please share.

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.