Changeset 1026 for trunk/lib/Stats.cc
- Timestamp:
- Jan 11, 2010, 5:11:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Stats.cc
r1008 r1026 361 361 } 362 362 363 363 364 std::string Stats::plot(const std::string& filename, 364 365 const std::string& linetype) const 365 366 { 366 if (Configuration::instance().image_format()=="none") 367 const std::string& format = Configuration::instance().image_format(); 368 if (format=="none") 367 369 return filename; 370 plot(filename, linetype, format); 371 const std::string& anchor_format = 372 Configuration::instance().image_anchor_format(); 373 374 if (format!=anchor_format) 375 plot(filename, linetype, anchor_format); 376 return filename; 377 } 378 379 380 void Stats::plot(const std::string& filename, 381 const std::string& linetype, 382 const std::string& format) const 383 { 368 384 assert(total_stats().size()); 369 Graph gp(filename+"."+Configuration::instance().image_format(), 370 Configuration::instance().image_format()); 385 Graph gp(filename+"."+format, format); 371 386 const Author2Vector* stat=NULL; 372 387 if (linetype=="total") … … 428 443 gp.current_color(255,0,0); 429 444 gp.plot(total, "total", get_back(*stat, "all")); 430 431 return filename;432 445 } 433 446 … … 435 448 void Stats::plot_summary(const std::string& filename) const 436 449 { 437 if (Configuration::instance().image_format()=="none") 438 return; 439 Graph gp(filename+"."+Configuration::instance().image_format(), 440 Configuration::instance().image_format()); 450 const std::string& format = Configuration::instance().image_format(); 451 if (format=="none") 452 return; 453 plot_summary(filename, format); 454 const std::string& anchor_format = 455 Configuration::instance().image_anchor_format(); 456 457 if (format!=anchor_format) 458 plot_summary(filename, anchor_format); 459 } 460 461 462 void Stats::plot_summary(const std::string& filename, 463 const std::string& format) const 464 { 465 Graph gp(filename+"."+format, format); 441 466 std::vector<unsigned int> total = get_vector(total_stats(), "all"); 442 467 double yrange_max=1.03*total.back()+1;
Note: See TracChangeset
for help on using the changeset viewer.