diff -Nru libchart-gnuplot-perl-0.16/Changes libchart-gnuplot-perl-0.17/Changes --- libchart-gnuplot-perl-0.16/Changes 2011-06-04 03:25:28.000000000 +0000 +++ libchart-gnuplot-perl-0.17/Changes 2011-09-17 13:08:04.000000000 +0000 @@ -1,5 +1,10 @@ Change log for Chart::Gnuplot +0.17 + - NEW control the display of arbitrary border of the graph + - FIX expression of range of numeric axis if time axis exists + (Bug ID: 69169) + 0.16 - Add support of creating animated gif - Option to unset "(x|y)tics" and "border" diff -Nru libchart-gnuplot-perl-0.16/debian/changelog libchart-gnuplot-perl-0.17/debian/changelog --- libchart-gnuplot-perl-0.16/debian/changelog 2011-06-04 21:21:25.000000000 +0000 +++ libchart-gnuplot-perl-0.17/debian/changelog 2011-09-17 16:17:52.000000000 +0000 @@ -1,3 +1,19 @@ +libchart-gnuplot-perl (0.17-1) unstable; urgency=low + + [ Ansgar Burchardt ] + * debian/control: Convert Vcs-* fields to Git. + + [ Salvatore Bonaccorso ] + * debian/copyright: Replace DEP5 Format-Specification URL from + svn.debian.org to anonscm.debian.org URL. + + [ gregor herrmann ] + * New upstream release. + * Bump debhelper compatibility level to 8. + * Add /me to Uploaders. + + -- gregor herrmann Sat, 17 Sep 2011 18:17:44 +0200 + libchart-gnuplot-perl (0.16-1) unstable; urgency=low * New upstream release diff -Nru libchart-gnuplot-perl-0.16/debian/compat libchart-gnuplot-perl-0.17/debian/compat --- libchart-gnuplot-perl-0.16/debian/compat 2010-07-29 12:32:29.000000000 +0000 +++ libchart-gnuplot-perl-0.17/debian/compat 2011-09-17 16:17:52.000000000 +0000 @@ -1 +1 @@ -7 +8 diff -Nru libchart-gnuplot-perl-0.16/debian/control libchart-gnuplot-perl-0.17/debian/control --- libchart-gnuplot-perl-0.16/debian/control 2011-06-04 19:32:38.000000000 +0000 +++ libchart-gnuplot-perl-0.17/debian/control 2011-09-17 16:17:52.000000000 +0000 @@ -1,15 +1,16 @@ Source: libchart-gnuplot-perl Section: perl Priority: optional -Build-Depends: debhelper (>= 7) +Build-Depends: debhelper (>= 8) Build-Depends-Indep: libtest-pod-coverage-perl, libtest-pod-perl, perl Maintainer: Debian Perl Group Uploaders: Alejandro Garrido Mota , - Salvatore Bonaccorso + Salvatore Bonaccorso , + gregor herrmann Standards-Version: 3.9.2 Homepage: http://search.cpan.org/dist/Chart-Gnuplot/ -Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libchart-gnuplot-perl -Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libchart-gnuplot-perl +Vcs-Git: git://git.debian.org/pkg-perl/packages/libchart-gnuplot-perl.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libchart-gnuplot-perl.git Package: libchart-gnuplot-perl Architecture: all diff -Nru libchart-gnuplot-perl-0.16/debian/copyright libchart-gnuplot-perl-0.17/debian/copyright --- libchart-gnuplot-perl-0.16/debian/copyright 2011-06-04 19:30:47.000000000 +0000 +++ libchart-gnuplot-perl-0.17/debian/copyright 2011-09-17 16:17:52.000000000 +0000 @@ -1,4 +1,4 @@ -Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 +Format-Specification: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=135 Maintainer: Ka-Wai Mak Source: http://search.cpan.org/dist/Chart-Gnuplot/ Name: Chart-Gnuplot @@ -8,8 +8,9 @@ License: Artistic or GPL-1+ Files: debian/* -Copyright: 2009-2011 Salvatore Bonaccorso +Copyright: 2009-2011, Salvatore Bonaccorso 2009, Alejandro Garrido Mota + 2011, gregor herrmann License: Artistic or GPL-1+ License: Artistic diff -Nru libchart-gnuplot-perl-0.16/lib/Chart/Gnuplot/Util.pm libchart-gnuplot-perl-0.17/lib/Chart/Gnuplot/Util.pm --- libchart-gnuplot-perl-0.16/lib/Chart/Gnuplot/Util.pm 2010-03-31 15:04:42.000000000 +0000 +++ libchart-gnuplot-perl-0.17/lib/Chart/Gnuplot/Util.pm 2011-09-17 13:06:04.000000000 +0000 @@ -4,7 +4,7 @@ use Exporter; @ISA = qw(Exporter); -@EXPORT_OK = qw(_lineType _pointType _copy); +@EXPORT_OK = qw(_lineType _pointType _borderCode _copy); # Convert named line type to indexed line type of gnuplot # @@ -73,6 +73,30 @@ } +# Encode the border name +# - Used by setting graph border display +sub _borderCode +{ + my ($side) = @_; + return($side) if ($side =~ /^\d+$/); + + my $code = 0; + $code += 1 if ($side =~ /(^|,)\s*(1|bottom|bottom left front)\s*(,|$)/); + $code += 2 if ($side =~ /(^|,)\s*(2|left|bottom left back)\s*(,|$)/); + $code += 4 if ($side =~ /(^|,)\s*(4|top|bottom right front)\s*(,|$)/); + $code += 8 if ($side =~ /(^|,)\s*(8|right|bottom right back)\s*(,|$)/); + $code += 16 if ($side =~ /(^|,)\s*(16|left vertical)\s*(,|$)/); + $code += 32 if ($side =~ /(^|,)\s*(32|back vertical)\s*(,|$)/); + $code += 64 if ($side =~ /(^|,)\s*(64|right vertical)\s*(,|$)/); + $code += 128 if ($side =~ /(^|,)\s*(128|front vertical)\s*(,|$)/); + $code += 256 if ($side =~ /(^|,)\s*(256|top left back)\s*(,|$)/); + $code += 512 if ($side =~ /(^|,)\s*(512|top right back)\s*(,|$)/); + $code += 1024 if ($side =~ /(^|,)\s*(1024|top left front)\s*(,|$)/); + $code += 2048 if ($side =~ /(^|,)\s*(2048|top right front)\s*(,|$)/); + return($code); +} + + # Copy object using dclone() of Storable sub _copy { diff -Nru libchart-gnuplot-perl-0.16/lib/Chart/Gnuplot.pm libchart-gnuplot-perl-0.17/lib/Chart/Gnuplot.pm --- libchart-gnuplot-perl-0.16/lib/Chart/Gnuplot.pm 2011-06-04 04:12:54.000000000 +0000 +++ libchart-gnuplot-perl-0.17/lib/Chart/Gnuplot.pm 2011-09-17 13:24:43.000000000 +0000 @@ -4,8 +4,8 @@ use Carp; use File::Copy qw(move); use File::Temp qw(tempdir); -use Chart::Gnuplot::Util qw(_lineType _pointType _copy); -$VERSION = '0.16'; +use Chart::Gnuplot::Util qw(_lineType _pointType _borderCode _copy); +$VERSION = '0.17'; # Constructor sub new @@ -390,8 +390,10 @@ if (ref($self->{$attr}) eq 'ARRAY') { # Deal with ranges from array reference - if (defined $self->{timeaxis}) + if (defined $self->{timeaxis} && + $self->{timeaxis} =~ /(^|,)\s*$1\s*(,|$)/) { + # $1-axis is a time axis print PLT "set $attr ['".join("':'", @{$self->{$attr}}). "']\n"; } @@ -447,7 +449,10 @@ { if (defined $self->{border}) { - print PLT "set border".&_setBorder($self->{border})."\n"; + print PLT "set border"; + print PLT " ".&_borderCode($self->{border}->{sides}) if + (defined $self->{border}->{sides}); + print PLT &_setBorder($self->{border})."\n"; push(@sets, 'border'); } else @@ -2138,15 +2143,37 @@ =head3 border -Border of the graph. Properties supported are "linetype", "width", and "color". -E.g. +Border of the graph. Properties supported are "sides", "linetype", "width", and +"color". E.g. border => { + sides => "bottom, left", linetype => 3, width => 2, color => '#ff00ff', } +C tells which side(s) will be displayed. Default is all four borders for +2D plots, and four bottom and left vertial borders for 3D plots. Acceptable +valurs are the 12-bit code (see the Gnuplot manual) or the following names: + + bottom + left + top + right + bottom left front + bottom left back + bottom right front + bottom right back + left vertical + right vertical + front vertical + back vertical + top left front + top left back + top right front + top right back + If you set this to C. E.g., border => undef @@ -2837,7 +2864,7 @@ =back -=head1 FUTURE PLAN +=head1 WISH LIST =over diff -Nru libchart-gnuplot-perl-0.16/MANIFEST libchart-gnuplot-perl-0.17/MANIFEST --- libchart-gnuplot-perl-0.16/MANIFEST 2010-03-31 15:04:42.000000000 +0000 +++ libchart-gnuplot-perl-0.17/MANIFEST 2011-09-17 13:08:54.000000000 +0000 @@ -117,6 +117,7 @@ t/axisTics_1.gp t/axisTics.t t/border_1.gp +t/border_2.gp t/border.t t/copy_1.dat t/copy_1.gp diff -Nru libchart-gnuplot-perl-0.16/META.yml libchart-gnuplot-perl-0.17/META.yml --- libchart-gnuplot-perl-0.16/META.yml 2011-06-04 04:13:05.000000000 +0000 +++ libchart-gnuplot-perl-0.17/META.yml 2011-09-17 13:25:13.000000000 +0000 @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Chart-Gnuplot -version: 0.16 +version: 0.17 abstract: Plot graph using Gnuplot in Perl on the fly author: - Ka-Wai Mak diff -Nru libchart-gnuplot-perl-0.16/t/border_2.gp libchart-gnuplot-perl-0.17/t/border_2.gp --- libchart-gnuplot-perl-0.16/t/border_2.gp 1970-01-01 00:00:00.000000000 +0000 +++ libchart-gnuplot-perl-0.17/t/border_2.gp 2011-09-17 12:51:14.000000000 +0000 @@ -0,0 +1,3 @@ +set terminal postscript enhanced color +set output "temp.ps" +set border 3 linetype 3 linewidth 2 linecolor rgb "#ff00ff" diff -Nru libchart-gnuplot-perl-0.16/t/border.t libchart-gnuplot-perl-0.17/t/border.t --- libchart-gnuplot-perl-0.16/t/border.t 2010-03-31 15:04:42.000000000 +0000 +++ libchart-gnuplot-perl-0.17/t/border.t 2011-09-17 12:53:04.000000000 +0000 @@ -1,12 +1,12 @@ #!/usr/bin/perl -w use strict; -use Test::More (tests => 1); +use Test::More (tests => 2); BEGIN {use Chart::Gnuplot;} my $temp = "temp.ps"; -# Test formatting the gridlines +# Test formatting the border { my $c = Chart::Gnuplot->new( output => $temp, @@ -21,6 +21,22 @@ ok(&diff($c->{_script}, "border_1.gp") == 0); } +# Test formatting the specified borders +{ + my $c = Chart::Gnuplot->new( + output => $temp, + border => { + sides => "left, bottom", + linetype => 3, + width => 2, + color => '#ff00ff', + }, + ); + + $c->_setChart(); + ok(&diff($c->{_script}, "border_2.gp") == 0); +} + ################################################################### # Compare two files