You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
The reason why the values don't appear as specified by MATLAB is that they are projected onto a bounding box around the axes; that way we can deal with far outliers, and is useful for lines plots. If the points aren't connected at all, this isn't necessary but it doesn't hurt either. Zooming of course doesn't work.
It may be useful to project the points onto a bounding box much larger than now, something around the TeX limits. I don't know what those are though, and they may even be machine-dependent.
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.
The text was updated successfully, but these errors were encountered: