strange/counterintuitive 'title' behavior

Michael Goffioul michael.goffioul at gmail.com
Sat May 3 10:56:47 CDT 2008


On Sat, May 3, 2008 at 5:14 PM, Sergei Steshenko <sergstesh at yahoo.com> wrote:
> Hello All,
>
>  if I run this:
>
>  "
>  figure_number = 0;
>  figure(++figure_number);
>  plot(0:9, 0.5 * (0:9), "-1;y1;", 0:9, 1.0 * (0:9), "-2;y2;");
>  title("Title after");
>
>  figure(++figure_number);
>  title("Title before");
>  plot(0:9, 0.5 * (0:9), "-1;y1;", 0:9, 1.0 * (0:9), "-2;y2;");
>  title("Title after");
>  ",
>
>  I'm getting two graphs - the first of them does have "Title after" written on it,
>  the second does _not_ have "Title before" written on it, though it first appears
>  and then, when the graph proper is rendered, disappears.
>
>  "help title" just says
>
>  "
>  Create a title object and return a handle to it.
>  ".
>
>  In everyday life we write titles before rather than after - that's why I think
>  the behavior looks strange/counterintuitive.
>
>  The terminal was set to 'wxt'; 'octave' version is 3.0.1.
>
>  Is it 'octave' or 'gnuplot' issue ?

This is how it is supposed to work. The call to "plot"
re-initializes the axes object, such that the previous
title is lost. In the "other-brand" world, all plot
annotations are done *after* plotting the data;
most of the plot functions (plot, semilogx...)
reset the axes object.

Michael.


More information about the Bug-octave mailing list