User guide matlab matlabfrag user guide Zebb Prime May Contents Introduction Background Compared to LaPrint Usage Within Matlab Within LaTeX Within pdfLaTeX Within LyX Creating ?gures in Matlab Sizing Color FontSize FontAngle FontWeight FontName Interpret

matlabfrag user guide Zebb Prime May Contents Introduction Background Compared to LaPrint Usage Within Matlab Within LaTeX Within pdfLaTeX Within LyX Creating ?gures in Matlab Sizing Color FontSize FontAngle FontWeight FontName Interpreter Multi-line text Custom tick labels Legends Tick scaling values Frequently occasionally asked questions Why does the output have three digit numbers all through it Why doesn ? t the tex ?le have the includegraphics state- ment in it like LaPrint does C Troubleshooting I get an error in Matlab I get a warning in Matlab I get the Unable to interpret TeX string warning in Mat- lab My graphic exports from Matlab ?ne but does not compile in LaTeX pdfLaTeX LyX My graphic exports from Matlab and compiles in LaTeX pdfLaTeX LyX but doesn ? t look right Advanced usage a discussion on renderers Advanced usage a discussion on axis ticks Introduction matlabfrag is a function which exports a Matlab ?gure to eps and tex ?les for use in LaTeX with psfrag It is inspired by LaPrint but is intended to be more WYSIWYG by respecting ?gure handles better The main reasons to use matlabfrag are the same as those for using psfrag ?gure font matching that of the document and the ability to have complex mathematical expressions typeset by LaTeX Background I wrote matlabfrag after becoming frustrated with the default LaPrint behaviour including it putting the line to insert the graphic in the output tex ?le includegraphics FileName eps Whilst these problems could be addressed using one of the many options in LaPrint I decided to take a stand against the many Matlab scripts and functions available which try to impose their own sense of style on my ?gures and instead write a function which does everything possible to respect the ?gure handles Everyone has their own sense of style for better or worse and I ? m sure most users have their own little scripts set up to format their ?gures in their own way The problem I have with the includegraphics FileName eps line in the tex ?le is that I keep my ?gures in a graphics subdirectory of my main document This meant I had to manually edit the tex ?le every time I exported the ?gure from Matlab C Compared to LaPrint In this section I compare the output from LaPrint and matlabfrag for an identical ?gure I have chosen some examples that shows some of the weaknesses of LaPrint so be sure to take these comparisons with a grain of salt The code for the ?rst comparison is given in examples comparison m and the results are shown in Figure Notice that the legend box for the LaPrint output has been shrunk and is too small for the equation and the y axis scale has disappeared I am unwilling to blame LaPrint for the equation not rendering as it may by a bug in any stage of the fairly complicated conversion process which has nothing to do with matlabfrag The output tex

  • 29
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Aucune attribution requise
Partager