#21 incorrect axis labels with OO plots

closed
PGPLOT (20)
5
2002-02-21
2001-07-02
Anonymous
No

PDL2.2.1

calling label_axes on a multipanel plot before data are
plotted causes the labels to be placed incorrectly.

this illustrates it:

$win = PDL::Graphics::PGPLOT::Window->new({Device =>
'/xs', NYPanel => 2 });

$win->label_axes( 'Time [s]', 'Sky X [pixel]', 'AR Lac:
Obsid 01385' );
$win->points( grandom(50), grandom(50), { symbol => -1,
HardLW => 1, LineWidth => 1 } );

$win->close;

the plot is (correctly) in the top panel, but the
labels annotate the bottom panel.

Discussion

  • Logged In: YES
    user_id=2045

    The wrong panel is a bug, but it turns out to be rather awkward to fix due to the logic inherent in the construction of labelled boxes in the
    code it is difficult (and not worth the effort IMHO)
    to get the above code to do what you want. But I'll leave the bug open..

    I have inserted a warning in the code if label_axes
    is called before env.

    Instead call env explicitly or use the Xtitle, Ytitle, Title options to points.

     
    • status: open --> closed