David.

This is exactly how I do it, but doesn't look very elegant. I mean,
plotting nothing to get something not visible, and then plot again what
you want... hmmm. Anyway, it works, which is the important thing :)

I forgot to ask: Is there a setting to plot in relative units (0-1)
within a view port?

Cheers,
Kåre

On Thu, 2010-10-28 at 11:30 -0500, David Mertens wrote:

> Kare -
> 
> Glad to hear the installation worked out. I have not been following
> the PDL lists for a few months now (gotta complete a dissertation) so
> I'm sorry I've not been around to help out.
> 
> It sounds like you are almost getting this to work, but when you try
> to draw the legend lines you get axes drawn for you smaller viewport.
> In order to have those not drawn, you need to specify blank xbox and
> ybox options, i.e.
> 
> $pl1->xyplot($x, $y, VIEWPORT => [0.15, 0.80, 0.15, 0.85], XBOX => '',
> YBOX => '');
> 
> Notice the arguments to XBOX and YBOX are empty strings. This will
> prevent any axis drawing or labeling for this and all future plots
> with this PLplot object ($pl1 in this case), unless of course you
> change the XBOX and YBOX settings so that they draw the axes again.
> You can read more about the XBOX and YBOX commands here:
> http://pdl.perl.org/?docs=Graphics/PLplot&title=PDL::Graphics::PLplot#xbox
> 
> I hope that clears things up.
> 
> David
> 
> P.S. This particular email address of mine is not subscribed to the
> PDL mailing list, so I cannot send it to perldl. I would appreciate if
> one of you could forward it. Thanks!
> 
> 
> On Thu, Oct 28, 2010 at 8:16 AM, Kåre Edvardsen
> <[email protected]> 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,
>         Kåre 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_pscairo=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