Thanks Jarle I was hoping their would be a higher level way to do it!
Just to be clear, one CAN call PGPLOT primitives directly from PDL. Just
use PGPLOT;
pgaxis(<args>);
But you don't get any of the nicer features of PDL::Graphics::PGPLOT.
On Jun 19, 2006, at 10:56 AM, Jarle Brinchmann wrote:
Following up on Karl's comment - it is possible to do part of this
in PDL, so that you can type:
env(0, 5, 0, 25, {AXIS => ['BNST', 'BNST']})
to set up a plot with only lower x-axis and left y-axis - but there
is no interface to PGAXIS. Unfortunately.
_However_, you can cheat if you set PlotPosition:
perldl> $x=sequence(5)
perldl> $y = $x*$x
perldl> env(0, 5, 0, 25, {AXIS => ['BNST', 'BNST'], PlotPosition=>
[0.1, 0.9, 0.1, 0.9]})
perldl> points $x, $y
perldl> env(0, 5, 0, 50, {AXIS => ['CNST', 'CMST'], PlotPosition=>
[0.1, 0.9, 0.1, 0.9]})
perldl> points $x, $y, {Color => 'Red'}
Not terribly pretty, but it works.... Notice the M in the second
call to env - this is to put labelling on the y-axis, if you use N
the plotting will work but you won't have labels.
Better interfaces would be nice, but I'm not going to do that for
now. It is easier than messing with PGPLOT directives directly
though - at least I hope so :) But it would be very nice to be able
to add further axes in a flexible way - right now it is a bit fiddly.
J.
_______________________________________________
Perldl mailing list
[EMAIL PROTECTED]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl