r48385 - in /branches/upstream/libchart-gnuplot-perl/current: Changes META.yml 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:09:16 UTC 2009
Author: carnil-guest
Date: Mon Dec 7 20:08:55 2009
New Revision: 48385
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=48385
Log:
[svn-upgrade] Integrating new upstream version, libchart-gnuplot-perl (0.12)
Modified:
branches/upstream/libchart-gnuplot-perl/current/Changes
branches/upstream/libchart-gnuplot-perl/current/META.yml
branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_13.pl
branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_14.pl
branches/upstream/libchart-gnuplot-perl/current/lib/Chart/Gnuplot.pm
Modified: branches/upstream/libchart-gnuplot-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libchart-gnuplot-perl/current/Changes?rev=48385&op=diff
==============================================================================
--- branches/upstream/libchart-gnuplot-perl/current/Changes (original)
+++ branches/upstream/libchart-gnuplot-perl/current/Changes Mon Dec 7 20:08:55 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: branches/upstream/libchart-gnuplot-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libchart-gnuplot-perl/current/META.yml?rev=48385&op=diff
==============================================================================
--- branches/upstream/libchart-gnuplot-perl/current/META.yml (original)
+++ branches/upstream/libchart-gnuplot-perl/current/META.yml Mon Dec 7 20:08:55 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: branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_13.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_13.pl?rev=48385&op=diff
==============================================================================
--- branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_13.pl (original)
+++ branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_13.pl Mon Dec 7 20:08:55 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: branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_14.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_14.pl?rev=48385&op=diff
==============================================================================
--- branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_14.pl (original)
+++ branches/upstream/libchart-gnuplot-perl/current/examples/plotStyle_14.pl Mon Dec 7 20:08:55 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: branches/upstream/libchart-gnuplot-perl/current/lib/Chart/Gnuplot.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libchart-gnuplot-perl/current/lib/Chart/Gnuplot.pm?rev=48385&op=diff
==============================================================================
--- branches/upstream/libchart-gnuplot-perl/current/lib/Chart/Gnuplot.pm (original)
+++ branches/upstream/libchart-gnuplot-perl/current/lib/Chart/Gnuplot.pm Mon Dec 7 20:08:55 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