Hi Kare: I think automatic drawing of legends is missing right now in the underlying PLplot library. I know there is work going on to add this feature.

Once that is done, myself (or some other generous developer) would have to find time to add the perl bindings.

So, I think this is on the horizon, but is not supported yet.

Regards,

  Doug

[email protected]
Software Engineer
UCAR - COSMIC, Tel. (303) 497-2611

On Thu, 28 Oct 2010, K?re Edvardsen wrote:

Hi!

Derek's suggestion of installing some plplot9-driver-* packages just worked 
fine :)

I just realised that legends is not straight forward with plplot. But nothing 
is impossible so I thought it could be an idea to set up a view port to the
right of a plot which is a result of this call:

$pl1->xyplot($x,$y, VIEWPORT => [0.15, 0.80, 0.15, 0.85]);

and then plot the legend "excell like" box to the right of the main plot in a 
viewport defined with these coordinates

[0.85, 0.95, 0.15, 0.85]

and plot legends in this tiny view port with axes scaled from 0 to 1 for 
simplicity.

Well, at least for me, this turned out very messy in the end... isn't ther a 
standard way to put up a view port with pre scaled axes that are not drawn
in the view port?

Rergards,
Kare Edvardsen

On Tue, 2010-10-26 at 08:48 -0600, Doug Hunt wrote:

Hi Edvard: This has to do with the drivers installed with plplot. It looks like plplot was not installed with the JPEG library. Did you compile and install plplot yourself, or did you use an Ubuntu package?

My recipe for building plplot looks something like this:

(untar plplot package and change to that directory)
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig
cmake -DCMAKE_INSTALL_PREFIX=/usr/lib -DPLD_png=ON -DPLD_jpeg=ON 
-DPLD_memcairo=ON -DDEFAULT_NO_BINDINGS=ON -DENABLE_cxx=ON -DPLD_pngcairo=ON 
-DPLD_pscai
ro=ON -DPLD_pdfcairo=ON CMakeLists.txt
make

This works for me on CentOS (RedHat enterprise clone) with libjpeg and cmake installed.

I think you should be able to install a new plplot underneith the PDL and PDL::Graphics::PLplot installation and it should still work.

Do any Ubuntu users have any quick suggestions?

Regards,

   Doug Hunt


[email protected]
Software Engineer
UCAR - COSMIC, Tel. (303) 497-2611

On Tue, 26 Oct 2010, Edvardsen K?re wrote:

> Dear Doug.
> > I'm running PDL v2.4.5 and perl v5.10.1 built for x86_64, under Ubuntu 10.04. > > I'd like to make some 2D plots with PLplot (or PGPLOT when very simple) and save them as jpeg's but I'm not offered jpeg as a device. I'm pretty sure I
> was able to write jpeg's in earlier installations of PDL.
> > Any idea what I'm doing wrong? > > > This is what I'm offered at the moment: > > perldl> $pl = PDL::Graphics::PLplot->new (DEV => "png", FILE => "test.png")
> Requested device png not available
> > Plotting Options:
> < 1> xwin       X-Window (Xlib)
> < 2> ps         PostScript File (monochrome)
> < 3> psc        PostScript File (color)
> < 4> xfig       Fig file
> < 5> null       Null device
> < 6> mem        User-supplied memory device
> < 7> svg        Scalable Vector Graphics (SVG 1.1)
> > Sincerely,
> Kare Edvardsen
> > -- > Kare Edvardsen
> Scientist
> Department of Engineering and Safety
> University of Tromso
> www.uit.no
> [email protected]
> Office: +47 77 66 03 85
> Swb:    +47 77 66 03 02
> Mob:    +47 90 74 60 69
> >



_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to