[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [newbie] advice for using LaTeX-code in Octave graphs

**From**: |
Torsten |

**Subject**: |
Re: [newbie] advice for using LaTeX-code in Octave graphs |

**Date**: |
Wed, 09 Oct 2013 18:20:48 +0200 |

**User-agent**: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |

On 09.10.2013 14:26, Ben Abbott wrote:
>* On Oct 9, 2013, at 6:15 AM, Jean Dubois wrote:*
>* *
>*> Can someone here tell me what the preferred method is for using LaTeX-code *
>*> in combination with Octave-plots.*
>*> I currently use "print -deps ..." to generate eps-files from my plots and *
>*> then I use psfrag in LaTeX to substitute simple labels and legends by more *
>*> complicated LaTeX-formulas. This method works but it often happens that the *
>*> placement and size of the final formulas is not optimal.*
>*>*
>*> thanks in advance,*
>*> jean*
>* *
>* Have you tried the epslatex, and/or tikz output formats?*
>* *
>* close all*
>* graphics_toolkit gnuplot*
>* plot (rand (3))*
>* xlabel ("indices")*
>* ylabel ("random value")*
>* print -depslatex test_epslatex*
>* *
>* To see how the files are to be included in a latex document, you can try the *
>* standalone version.*
>* *
>* print -depslatexstandalone test_epslatex*
>* *
>* If you are using pdflatex, just replace "epslatex" with "pdflatex"*
>* *
I second that: epslatex (pdflatex) works quite well. Maybe it is worth
mentioning that you can use latex-syntax in labels, legends etc. like
legend('$y_R(t)$','$y(t)$','$u(t)$');
xlabel('$t$ in s');
ylabel('$y_R(t)$, $y(t)$, $u(t)$');
Torsten