Skip to content

Commit

Permalink
Merge branch 'version/2.5'
Browse files Browse the repository at this point in the history
* version/2.5:
  bugfix: add import of Pod::Usage to init_pipeline.pl
  bugfix: gnuplot requires zero or both values to be set for a time axis, but not just one
  Ranges shorter than 6 days will still show each date twice, so we still need to show the timestamp
  • Loading branch information
ens-bwalts committed Oct 12, 2018
2 parents ba8c14a + 671cf8c commit c1c364d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/generate_timeline.pl
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ sub main {

my $data_start = Time::Piece->strptime( $xdata[0] , '%Y-%m-%dT%H:%M:%S');
my $data_end = Time::Piece->strptime( $xdata[-1], '%Y-%m-%dT%H:%M:%S');
my $xlabelfmt = $data_end-$data_start >= 3*24*3600 ? '%b %d' : '%b %d\n %H:%M';
my $xlabelfmt = $data_end-$data_start >= 6*24*3600 ? '%b %d' : '%b %d\n %H:%M';

# The main Gnuplot object
my $chart = Chart::Gnuplot->new(
Expand All @@ -360,7 +360,7 @@ sub main {
terminal => $terminal_mapping{$gnuplot_terminal},
ylabel => $allowed_modes{$mode},
yrange => [$pseudo_zero_value, undef],
($start_date || $end_date) ? (xrange => [$start_date, $end_date]) : (),
($start_date && $end_date) ? (xrange => [$start_date, $end_date]) : (),
);
$chart->plot2d(@datasets);

Expand Down
1 change: 1 addition & 0 deletions scripts/init_pipeline.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ BEGIN
}

use Getopt::Long qw(:config pass_through no_auto_abbrev);
use Pod::Usage;
use Bio::EnsEMBL::Hive::Utils ('load_file_or_module');
use Bio::EnsEMBL::Hive::Scripts::InitPipeline;

Expand Down

0 comments on commit c1c364d

Please sign in to comment.