Changeset 29437 for trunk/tools/czartool/Plotter.pm
- Timestamp:
- Oct 15, 2010, 12:34:37 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/czartool/Plotter.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czartool/Plotter.pm
r29377 r29437 130 130 ########################################################################### 131 131 sub createTimeSeries { 132 my ($self, $label, $selectedStage, $beginTime, $endTime, $isLog, $showCleanup ) = @_;132 my ($self, $label, $selectedStage, $beginTime, $endTime, $isLog, $showCleanup, $deriv) = @_; 133 133 134 134 my $minX = 999999999; … … 156 156 \$gnuplotFile, 157 157 $isLog, 158 $showCleanup)) { 158 $showCleanup, 159 $deriv)) { 159 160 160 161 $gnuplotFiles{$stage} = $gnuplotFile; … … 186 187 $minX, 187 188 $timeDiff, 188 $isLog); 189 $isLog, 190 $deriv); 189 191 } 190 192 … … 325 327 ########################################################################### 326 328 sub plotTimeSeries { 327 my ($self, $gnuplotFiles, $outputFile, $label, $fromTime, $toTime, $maxX, $minX, $timeDiff, $isLog ) = @_;329 my ($self, $gnuplotFiles, $outputFile, $label, $fromTime, $toTime, $maxX, $minX, $timeDiff, $isLog, $isDeriv) = @_; 328 330 329 331 my $timeFormat = undef; 330 332 my $divX = undef; 331 333 my $yTitle = undef; 332 if ($isLog) {$yTitle = "Log( numExposures )";} 333 else {$yTitle = "numExposures";} 334 if ($isLog) {$yTitle = "Log( Exposures )";} 335 elsif ($isDeriv) {$yTitle = "dExposures/dTime";} 336 else {$yTitle = "Exposures";} 334 337 335 338 $self->getTimeSpacing($timeDiff, \$divX, \$timeFormat); 336 339 337 340 my $numOfPlots = keys %$gnuplotFiles; 338 my $title = undef;339 341 340 342 # sort out plot title 341 if ($numOfPlots == 1) {foreach my $stage (keys %$gnuplotFiles) {$title = "'".$stage."'";}} 342 else {$title = "'All stages'"} 343 my $title = ""; 344 if ($isDeriv) {$title .= "First derivatives of "} 345 if ($numOfPlots == 1) {foreach my $stage (keys %$gnuplotFiles) {$title .= "'".$stage."'";}} 346 else {$title .= "'all stages'"} 343 347 344 348 $title .= " for '$label', '$fromTime' to '$toTime'"; … … 369 373 if ($numOfPlots == 1) { 370 374 375 print GP "'" . $gnuplotFiles->{$stage} . "' using 1:2 title \"Pending\" with lines lt 4 lw 2,"; 371 376 print GP "'" . $gnuplotFiles->{$stage} . "' using 1:4 title \"Processed\" with lines lt 2 lw 2,"; 372 print GP "'" . $gnuplotFiles->{$stage} . "' using 1:2 title \"Pending\" with lines lt 4 lw 2,";373 377 print GP "'" . $gnuplotFiles->{$stage} . "' using 1:3 title \"Faults\" with lines lt 7 lw 2"; 374 378 }
Note:
See TracChangeset
for help on using the changeset viewer.
