Data2Dynamics / d2d

a modeling environment tailored to parameter estimation in dynamical systems
https://github.com/Data2Dynamics/d2d
57 stars 29 forks source link

matlab2tikz bug #23

Closed leshaker closed 8 years ago

leshaker commented 9 years ago

Originally reported by: Andreas Raue (Bitbucket: araue, GitHub: araue)


Hi,

There seems to be a bug when using the matlab2tikz function. For the Raia, example, and the command arPlot(true) I get the following error message:

#!matlab
Error using set
Children may only be set to a permutation of itself

Error in arPlotY>mySaveFigure (line 829)
        set(haxes(iaxis),'Children',[axischild(lineind); axischild(patchind_sorted)])

Error in arPlotY (line 563)
                    ar.model(jm).plot(jplot).savePath_FigY = mySaveFigure(h, ar.model(jm).plot(jplot).name);

Error in arPlot (line 71)
arPlotY(saveToFile, fastPlot, doLegends);

Berni, could you try to fix this? I don't understand exactly what your piece of code is doing.


leshaker commented 9 years ago

Original comment by Bernhard Steiert (Bitbucket: bernhardsteiert, GitHub: bernhardsteiert):


Fix issue #23

leshaker commented 9 years ago

Original comment by Bernhard Steiert (Bitbucket: bernhardsteiert, GitHub: bernhardsteiert):


Hi Andreas,

I just ran arPlot(true) and arReport for the Raia example without errors and the result looks fine.

The piece of code where the error occurs changes the order of patches and lines to bring lines to the front and patches with a FaceColor to the back. Although I can not reproduce the error message I will try to implement a fix soon.

Best, Bernhard