Chart
view release on metacpan or search on metacpan
t/Humidity.t view on Meta::CPAN
36.1, 36.2, 36.2, 36.1, 36.2, 36.2, 36.2, 36.2, 36.2, 36.2, #59
36.1, 36.1, 36.2, 36.2, 36.2, 36.2, 36.2, 36.1, 36.2, 36.2, #60
36.2, 36.2, 36.1, 36.2, 36.1, 36.1, 36.2, 36.2, 36.2, 36.2, #61
36.3, 36.1, 36.2, 36.2, 36.2, 36.3, 36.2, 36.2, 36.1, 36.2, #62
36.3, 36.2, 36.3, 36.3, 36.3, 36.3, 36.3, 36.5, 36.3, 36.4, #63
36.3, 36.3, 36.3, 36.2, 36.3, 36.3, 36.3, 36.3, 36.3, 36.2, #64
36.2, 36.2, 36.2, 36.2, 36.2, 36.2, 36.2, 36.1, 36.1, 36.2, #65
36.2, 36.2, 36.2, 36.2, 36.1, 36.1, 36.2, 36.1, 36.1, 36.1, #66
36.2, 36.1, 36.2, 36.2, 36.2, 36.5, 36.3, 36.2, 36.3, 36.4, #67
36.4, 36.4, 36.4, 36.4, 36.3, 36.3, 36.4, 36.4, 36.4, 36.4, #68
36.4, 36.4, 36.3, 36.4, 36.4, 36.4, 36.3, 36.4, 36.3, 36.2, #69
36.2, 36.2, 36.3, 36.1, 36.2, 36.1, 36.1, 36.1, 36.1, 36.2, #70
36.1, 36.2, 36.1, 36.1, 36.1, 36.1, 36.1, 36.1, 36.2, 36.2, #71
36.2, 36.1, 36.2, 36.2, 36.2, 36.2, 36.2, 36.2, 36.2
); #72
#------------------------------------------------------------------------------------
# Zeitarray aufbauen , Minimal- und Maximalwert bestimmen und X - Achse berechnen
#------------------------------------------------------------------------------------
#------------------------------------------------------------------------------------
# Graphic_objekt erstellen
#------------------------------------------------------------------------------------
$min_y = $max_y = $messwerte[0];
foreach (@messwerte)
{
if ( $_ < $min_y ) { $min_y = $_; }
if ( $_ > $max_y ) { $max_y = $_; }
}
$min_y = int($min_y) - 1;
$max_y = int($max_y) + 1;
$graphic = Chart::Lines->new( 750, 400 );
$graphic->set( 'brush_size' => 2 );
$graphic->add_dataset(@zeit);
$graphic->add_dataset(@messwerte);
#------------------------------------------------------------------------------------
# Diagramm Y-Achse berechnen
#------------------------------------------------------------------------------------
$graphic->set( 'min_val' => $min_y );
$graphic->set( 'max_val' => $max_y );
#$graphic -> set ('y_ticks' => 11 );
$graphic->set( 'x_ticks' => 'vertical' );
$graphic->set( 'skip_x_ticks' => 30 );
$graphic->set( 'grey_background' => 'false' );
$graphic->set( 'graph_border' => 18 );
$graphic->set( 'title' => $titel_name );
$graphic->set( 'sub_title' => "over Time" );
$graphic->set( 'y_grid_lines' => 'true' );
$graphic->set( 'x_grid_lines' => 'true' );
$graphic->set( 'x_ticks' => 'vertical' );
$graphic->set(
'colors' => { 'y_grid_lines' => [ 127, 127, 0 ], 'x_grid_lines' => [ 127, 127, 0 ], 'dataset0' => [ 0, 0, 200 ] } );
$graphic->set( 'legend' => 'none' );
$graphic->set( 'x_label' => 'Time (UTC)' );
$graphic->set( 'y_label' => $einheit );
if ( $graphic->can('gif') )
{
my $wettgif = "$samples/" . $gif_name . ".gif";
$graphic->gif($wettgif);
}
elsif ( $graphic->can('png') )
{
my $wettgif = "$samples/" . $gif_name . ".png";
$graphic->png($wettgif);
}
print "ok 1\n";
exit(0);
( run in 1.997 second using v1.01-cache-2.11-cpan-437f7b0c052 )