File Exchange Pick of the Week

September 24th, 2007

TeX interpreter in x tick and y tick labels

Writing a file that solves a problem that gets called into our tech support team is a very good way of becoming Pick Of The Week. This week a MATLAB user wanted to know how to use the TeX interpreter on x and y ticks. This is not supported, but if you download this file, you will be able to.

4 Responses to “TeX interpreter in x tick and y tick labels”

  1. Roy Goodman replied on :

    As much as I want to use Matlab’s built-in TeX interpreters, they tend to increase the file size (in postscript) to an astounding level, which then causes some scientific journals and the arxiv.org preprint server to reject the files as too big. A workaround is to put plain text in my figures, and ten modify the .eps files with the LaTeX package psfragThis gives much smaller .eps files, but is very inconvenient. Obviously I’d like to do everything in Matlab, but at this point, that doesn’t seem like it’s feasible.

  2. Doug replied on :

    I went to the LaTeX guru here at The MathWorks. He had this to say:

    “When MATLAB saves a LaTeX-interpreted string to an .eps file, it embeds Postscript definition files for each Computer Modern font needed to display the string. MATLAB does this because it does not know which Postscript fonts may be defined on a destination machine that may load the .eps file later.

    In Example 4 from Doug’s video, MATLAB embeds font definitions for CMR10, CMR7, CMR10, CMR7, CMSY7, in that order, into the .eps file. I think it is unnecessary for MATLAB to embed CMR10 and CMR7 twice — this may be a bug. Also, in some future release, we may want to find a way to integrate with psfrag-like apps more efficiently.”

  3. Roy Goodman replied on :

    Doug,
    Thanks for seeking out an answer for me. This issue has been bugging me for a long time.
    Roy

  4. cong replied on :

    Thank you so much!!
    This is what I really want!!!

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Bob, Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

  • Beats: Not useful for everyday but very interesting. Thanks.
  • nickey: Hi Brett, I’ve tested Tao’s program and yours too. They ran successfully. I’ve tried to...
  • Kika: THANK YOU!! I’ve been trying to change the colormap but I didn’t know what to do. It was driving me crazy!...
  • Richard: Hello Doug, yet another question. I followed this tutorial: http://blinkdagger.c om/matlab/matlab-...
  • Doug: Richard, Use the compiler options file, it is found at the bottom of the dialog that you get when clicking on...
  • Richard: To whom it may concern, a solution to the dos screen annoyance is found by user ‘vihang’ in this...
  • Richard: Thank you for your reply. I understand that I can specify flags using the mcc command, but is this also...
  • Doug: Richard: Find it here: http://www.mathworks .com/access/helpdesk /help/toolbox/compil er/mcc.html Doug
  • Richard: Hello Doug, Can you explain point 56. (about the -e flag) because I can’t seem to find it. Regards,...
  • Doug: Tony, When you say the .MAT file has 984 files, you mean it has the *names* of the files. So the real problem...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.