nschloe/matlab2tikz — Issue #57: dimension too large axis
Author: kelkington
Created: 2011-12-31 10:30:13+00:00
State: open

I am not sure if this is a problem with matlab2tikz, or a problem with the plotting in MATLAB.

Take the short example

test=[-1e6,0;-1,1;-1,-1;-10,0];
plot(test(:,1),test(:,2),'.')
axis([-2,0,-2,2])

In the tikz file the axis is saved as it should be. However there are two problems with the points that fall outside the axis. Firstly, the point (-10,0) is recorded incorrectly as (-8.5,-0.166667), which is a problem if I want to come back and expand the axes later, but perhaps this is not one of the intended functions of matlab2tikz. The second more serious error is that the when compiling the error "dimension too large" appears. If the entry corresponding to (-1e6,0) is removed, then the document is able to be compiled.