matlab2tikz / matlab2tikz

This program converts MATLAB®/Octave figures to TikZ/pgfplots figures for smooth integration into LaTeX.
http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz
BSD 2-Clause "Simplified" License
1.56k stars 318 forks source link

Tackle all TODOs and FIXMEs in the code #617

Open egeerardyn opened 9 years ago

egeerardyn commented 9 years ago

We have lots of TODOs and FIXMEs in our code. They will have to go.

I've used the TodoReview plugin of SublimeText to generate the report below (though MATLAB has similar functionality). Links to the code here are just for convenience and not guaranteed to be perfectly in sync.

// Wednesday 08/12/15 at 01:48PM - 688 files in 4.48 secs

FIXME (50)

edit: updated for 33667a0 (i.e. the 1.0 release) edit: updated for 2f5433a

bene86 commented 9 years ago

regarding this todo: src/matlab2tikz.m:921 use proper grid ordering I implemented the solution from http://tex.stackexchange.com/questions/14458/tikz-pgfplots-advanced-z-order-axis-grid

I inserted the following into my template preamble:

\makeatletter \newcommand{\pgfplotsdrawaxis}{\pgfplots@draw@axis} \makeatother
\pgfplotsset{axis line on top/.style={
  axis line style=transparent,
  ticklabel style=transparent,
  tick style=transparent,
  axis on top=false,
  after end axis/.append code={
    \pgfplotsset{axis line style=opaque,
      ticklabel style=opaque,
      tick style=opaque,
      grid=none}
    \pgfplotsdrawaxis}
  }
}

and set 'axis line on top' as an 'extraAxisOptions' in matlab2tikz. Now everything looks as I want it. Would that be an idea to implement it into matlab2tikz?

egeerardyn commented 9 years ago

@bene86: Thanks for the suggestion. I'm glad there is a workaround for this (that doesn't rely on overplotting another axis). But for inclusion in matlab2tikz I have a few concerns:

okomarov commented 9 years ago

As @egeerardyn points out, pgfplots page 354 \pgfplotssetlayers{<layer configuration name>} allows to control grid ordering (src/matlab2tikz.m:921)

egeerardyn commented 9 years ago

This page will be updated less often in the future. For an up-to-date overview, please ask Jenkins, but make sure you change the build number to the latest one!)