title: How to convert PDL image to GdkPixbuf
body: <p>I'm trying to display a graph generated by PDL (using PLplot) inside a Gtk3 app.  When I try the following code, I see two problems:</p>
  
  <ol>
  <li>$pdlImg isn't a GdkPixbuf so new_from_pixbuf() doesn't work.</li>
  <li>$pdlImg appears to be empty as because the error message prints out the 10x10x3 array as a string and they're all zeroes.</li>
  </ol>
  
  <p>Code:</p>
  
  <pre><code>#!/usr/bin/perl -w
  
  use strict;
  use PDL;
  use PDL::Graphics::PLplot;
  use Gtk3 -init;
  
  my $pdlImg = zeroes(byte, 10, 10, 3);
  my $pl = PDL::Graphics::PLplot-&gt;new(DEV =&gt; 'mem', MEM =&gt; $pdlImg);
  my $x = sequence(10);
  my $y = $x**2;
  $pl-&gt;xyplot($x, $y);
  $pl-&gt;close;
  
  my $win = Gtk3::Window-&gt;new;
  my $img = Gtk3::Image-&gt;new_from_pixbuf($pdlImg);
  $win-&gt;add($img);
  $win-&gt;show_all;
  Gtk3::main();
  </code></pre>