r48387 - in /trunk/libchart-gnuplot-perl: Changes META.yml debian/changelog examples/plotStyle_13.pl examples/plotStyle_14.pl lib/Chart/Gnuplot.pm

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Mon Dec 7 20:11:10 UTC 2009


Author: carnil-guest
Date: Mon Dec  7 20:11:05 2009
New Revision: 48387

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=48387
Log:
New upstream release

Modified:
    trunk/libchart-gnuplot-perl/Changes
    trunk/libchart-gnuplot-perl/META.yml
    trunk/libchart-gnuplot-perl/debian/changelog
    trunk/libchart-gnuplot-perl/examples/plotStyle_13.pl
    trunk/libchart-gnuplot-perl/examples/plotStyle_14.pl
    trunk/libchart-gnuplot-perl/lib/Chart/Gnuplot.pm

Modified: trunk/libchart-gnuplot-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libchart-gnuplot-perl/Changes?rev=48387&op=diff
==============================================================================
--- trunk/libchart-gnuplot-perl/Changes (original)
+++ trunk/libchart-gnuplot-perl/Changes Mon Dec  7 20:11:05 2009
@@ -1,4 +1,9 @@
 Change log for Chart::Gnuplot
+
+0.12
+    - More understandable error messages
+    - Add an example in POD
+      (Thanks to WOLfgang Schricker)
 
 0.11
     - Add new plotting styles "hbars" (horizontal bars) and "hlines"

Modified: trunk/libchart-gnuplot-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libchart-gnuplot-perl/META.yml?rev=48387&op=diff
==============================================================================
--- trunk/libchart-gnuplot-perl/META.yml (original)
+++ trunk/libchart-gnuplot-perl/META.yml Mon Dec  7 20:11:05 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Chart-Gnuplot
-version:            0.11
+version:            0.12
 abstract:           Plot graph using Gnuplot on the fly
 author:
     - Ka-Wai Mak

Modified: trunk/libchart-gnuplot-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libchart-gnuplot-perl/debian/changelog?rev=48387&op=diff
==============================================================================
--- trunk/libchart-gnuplot-perl/debian/changelog (original)
+++ trunk/libchart-gnuplot-perl/debian/changelog Mon Dec  7 20:11:05 2009
@@ -1,5 +1,6 @@
-libchart-gnuplot-perl (0.11-2) UNRELEASED; urgency=low
+libchart-gnuplot-perl (0.12-1) UNRELEASED; urgency=low
 
+  * New upstream release
   * debian/control: Changed: Replace versioned (build-)dependency on
     perl (>= 5.6.0-{12,16}) with an unversioned dependency on perl (as
     permitted by Debian Policy 3.8.3).

Modified: trunk/libchart-gnuplot-perl/examples/plotStyle_13.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libchart-gnuplot-perl/examples/plotStyle_13.pl?rev=48387&op=diff
==============================================================================
--- trunk/libchart-gnuplot-perl/examples/plotStyle_13.pl (original)
+++ trunk/libchart-gnuplot-perl/examples/plotStyle_13.pl Mon Dec  7 20:11:05 2009
@@ -7,6 +7,7 @@
 # Initiate the chart object
 my $chart = Chart::Gnuplot->new(
     output => 'gallery/plotStyle_13.png',
+    title  => 'horizontal bars'
 );
 
 # Raw data

Modified: trunk/libchart-gnuplot-perl/examples/plotStyle_14.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libchart-gnuplot-perl/examples/plotStyle_14.pl?rev=48387&op=diff
==============================================================================
--- trunk/libchart-gnuplot-perl/examples/plotStyle_14.pl (original)
+++ trunk/libchart-gnuplot-perl/examples/plotStyle_14.pl Mon Dec  7 20:11:05 2009
@@ -7,6 +7,7 @@
 # Initiate the chart object
 my $chart = Chart::Gnuplot->new(
     output => 'gallery/plotStyle_14.png',
+    title  => 'horizontal lines',
 );
 
 # Raw data

Modified: trunk/libchart-gnuplot-perl/lib/Chart/Gnuplot.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libchart-gnuplot-perl/lib/Chart/Gnuplot.pm?rev=48387&op=diff
==============================================================================
--- trunk/libchart-gnuplot-perl/lib/Chart/Gnuplot.pm (original)
+++ trunk/libchart-gnuplot-perl/lib/Chart/Gnuplot.pm Mon Dec  7 20:11:05 2009
@@ -5,7 +5,7 @@
 use File::Copy;
 use File::Temp qw(tempdir);
 use Chart::Gnuplot::Util qw(_lineType _pointType);
-$VERSION = '0.11';
+$VERSION = '0.12';
 
 # Constructor
 sub new
@@ -922,7 +922,14 @@
     # Execute gnuplot
     my $gnuplot = 'gnuplot';
     $gnuplot = $self->{gnuplot} if (defined $self->{gnuplot});
-    system("$gnuplot $self->{_script}");
+    my $err = `$gnuplot $self->{_script} 2>&1`;
+
+    # Capture and process error message from Gnuplot
+    if (defined $err && $err ne '')
+    {
+        my ($errTmp) = ($err =~ /\", line \d+:\s(.+)/);
+        die "$errTmp\n" if (defined $errTmp);
+    }
 
     # Convert the image to the user-specified format
     if (defined $self->{output} && $self->{output} =~ /\./)
@@ -1077,7 +1084,16 @@
         }
         else
         {
-            system("$convert -rotate 90 $temp $temp".".$imgfmt");
+            my $cmd = "$convert -rotate 90 $temp $temp".".$imgfmt 2>&1";
+            my $err = `$cmd`;
+            if (defined $err && $err ne '')
+            {
+                die "Unsupported image format ($imgfmt)\n" if
+                    ($err =~ /^convert: unable to open module file/);
+
+                my ($errTmp) = ($err =~ /^convert: (.+)/);
+                die "$errTmp Perhaps the image format is not supported\n";
+            }
         }
     }
 
@@ -2389,7 +2405,19 @@
 
     $chart->plot2d($sine, $cosine, $tangent);
 
-=item 6. Plot a financial time series
+=item 6. Title in non-English characters (Thanks to WOLfgang Schricker)
+
+    use Encode;
+
+    my $title = ...   # Title with German umlauts
+    $title = decode("utf8", $title);
+
+    Chart::Gnuplot->new(
+        encoding => 'iso-8859-1',
+        title    => $title,
+    );
+
+=item 7. Plot a financial time series
 
     my $chart = Chart::Gnuplot->new(
         output   => "dj.ps",
@@ -2409,7 +2437,7 @@
 
     $chart->plot2d($dow);
 
-=item 7. Plot several graphs on the same image
+=item 8. Plot several graphs on the same image
 
     my $chart = Chart::Gnuplot->new(
         output => "multiplot.gif",




More information about the Pkg-perl-cvs-commits mailing list