octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiline labels in graphics


From: Moritz Borgmann
Subject: Re: Multiline labels in graphics
Date: Mon, 24 Mar 2008 04:12:39 +0100

yep, adding \n per se works, and it's essentially what I'm doing. The problem is not inserting the \n, but what Octave does to it afterward... (slapping braces around the whole thing, which will confuse gnuplot...)

I'm not following or finding what you found. I've modified my __axis_label__.m file per the patch and everything works fine. For example, I try

plot([0:50]);
A = {"testing", "1^2_3"};
title(A);
xlabel(A);
ylabel(A);

and the result looks just the way I think it should look. I know that your new code is being executed because I took away a semicolon so that I could see the resulting "txt".

Doing a

set(1, "__plot_stream__", 1);

shows the gnuplot stream in which I see the following:

set title "address@hidden" font "Helvetica,10" enhanced;

This all looks quite good to me. Could you give a series of commands in which it fails? Try the "set(1, "__plot_stream__", 1);" to pinpoint where the extraneous "}" is coming from.

Well, I guess I should say that I've tried it with the x11 terminal. Perhaps it is a gnuplot bug in another terminal driver.

That's (almost) it. I've found the offending code:

scripts/plot/__go_draw_axes__.m
1627-  if (enhanced)
1628-    if (strcmp (obj.interpreter, "tex"))
1629-      str = __tex2enhanced__ (str, fnt, it, bld);
1630-      if (! have_newer_gnuplot)
1631:   ## Set the font to work around gnuplot 4.0 X11 enhanced terminal bug
1632-   str = strcat ('{/', f, ' ', str, ' }');
1633-      endif
1634-    elseif (strcmp (obj.interpreter, "latex"))
1635-      if (! warned_latex)

(it's line 1632, which is only triggered with my older gnuplot from fink). Does somebody have a clue whether my patch breaks other stuff that makes similar assumptions as line 1632? Also, how can the problem be fixed?

-M


reply via email to

[Prev in Thread] Current Thread [Next in Thread]