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'm trying to get matlab2tikz to work. I want to use it for prettyfying output of Matlab's image() command.

In Matlab I tried

imagesc(rand(100));
xlabel('X');
ylabel('Y');
title('Random Colors');
matlab2tikz('image.tikz');

but when I do

\usepackage{pgfplots}
\input{../../../../src/image.tikz}

it get error

ERROR: Package pgfkeys Error: I do not know the key '/tikz/y dir' and I am going to ignore it. Perhaps you misspelled it.

Also when I try the matlab2tikz recommended settings

\pgfplotsset{compat=newest} % For best results

I get a similar error

ERROR: Package pgfkeys Error: I do not know the key '/pgfplots/compat' and I am going to ignore it. Perhaps you misspelled it.

How do I determine if my pgfplots version is too old? I'm on Ubuntu 11.10. The latest version of pgfplots itself is 1.5.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

The keys in question have been introduced in pgfplots version 1.3 . I suppose your TeX version comes with pgfplots 1.2.2 . You can inspect the actual versions on your system by looking into the .log file: in always contains the versions of every loaded package (search for 'pgfplots').

share|improve this answer
1  
Note that the pgfplots manual contains detailed installation instructions which should allow you to upgrade to a recent version without changing the system-wide tex distribution. –  Christian Feuersänger Dec 19 '11 at 17:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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