Print Euro symbol

Discussion in 'MATLAB' started by Thomas, Aug 17, 2007.

  1. Thomas

    Thomas Guest


    does anybody know how to include an Euro symbol ('€') in a
    figure and print it on a postscript printer?

    Best regards
    Thomas, Aug 17, 2007
    1. Advertisements

  2. Thomas

    us Guest

    <SNIP a european...

    one of the solutions

    'fontname','courier new');

    us, Aug 17, 2007
    1. Advertisements

  3. Thomas

    Thomas Guest

    Thank you for your prompt answer.
    Your solution works when I print the figure directly in
    verbose mode. Though, it fails when I try to print it
    (figure handle fh) to a file using


    After distilling it to PDF the Euro symbol is gone. Any
    idea how could this be solved?
    Thomas, Aug 17, 2007
  4. Thomas

    Thomas Guest

    Finally, I found a solution by switching to symbol font.

    To get a PDF with a figure containing the string "Less than
    10€ per piece." the following code could be used:

    % --------------------------
    fh = figure;
    text(fh,0.5,0.5,strcat('Less than 10\fontname{Symbol}',char
    (160),'\fontname{Helvetica}per piece.');
    % --------------------------

    Finally, the postscript file "" needs to be
    distilled to PDF.

    The '€' symbol will not be displayed in the MATLAB figure
    but it will show up in the PDF.

    (The archaic printer driver functions of MATLAB are
    hopelessly outdated. The use of Unicode encoding and system
    available fonts in graphics is standard elsewhere.)
    Thomas, Aug 18, 2007
  5. Hello,
    I am using Matlab running on a Linux OS and the tips you gave don't seem to work :-(
    I want to get the euro symbol on a figure (ylabel and xlabel) and I want to save this figure as a pdf file.
    Which command should I use ?

    Thank you
    Franck Bourry, Oct 13, 2009
  6. Thomas

    Thomas Guest

    Hi Franck,

    for my system (MS Windows XP) and my pdf-font the ASCII code for the "Euro"-symbol is 160. For you it might be a different one.

    In order to find out about it you might try the following code at first:

    % --------------------------
    fh = figure;
    for i=1:4
    for j=1:32
    t = 128 + (i-1)*32+j;
    text((i-1)*0.25,1-(j-1)/32,['char(' num2str(t) ') = ' char(t)],'FontName','Symbol','FontSize',10);
    % --------------------------

    I suggest you identify the ASCII-code for the "Euro"-symbol in the figure both on the screen and in the resulting file "" (after you distilled it to "charset.pdf"). Just replace the number 160 in the code I posted earlier with the one you found and it should work.
    Thomas, Nov 13, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.