Changeset 859
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Graph.cc
r858 r859 33 33 pls_.init(); 34 34 pls_.adv(0); 35 pls_.scolbg(0,100,0);36 pls_.rgb(255,0,0);37 35 pls_.vsta(); 38 36 } 37 39 38 40 39 Graph::~Graph(void) 41 40 { 42 41 } 42 43 43 44 44 bool Graph::date_xticks(void) … … 48 48 49 49 50 void Graph::fgcolour(unsigned char r, unsigned char g, unsigned char b) 51 { 52 pls_.rgb(r,g,b); 53 } 54 55 50 56 void Graph::plot(const std::vector<unsigned int>& x) 51 57 { 52 pls_.wind(0, x.size(), 0, x.back());53 pls_.box("bcnst d", 100, 5, "bcnstv", 100, 5);58 pls_.wind(0, x.size(), 0, yrange_); 59 pls_.box("bcnstv", 10, 1, "bcnstv", yrange_/5, 1); 54 60 for (unsigned int i=1; i<x.size(); ++i) { 55 61 pls_.join(i-1,x[i-1],i-1,x[i]); … … 67 73 double Graph::yrange(double ymax) 68 74 { 69 return y max;75 return yrange_=ymax; 70 76 } 71 77 -
trunk/lib/Graph.h
r858 r859 47 47 static bool date_xticks(void); 48 48 49 void fgcolour(unsigned char r, unsigned char g, unsigned char b); 49 50 void plot(const std::vector<unsigned int>&); 50 51 … … 56 57 plstream pls_; 57 58 static std::vector<std::string> xticks_; 59 double yrange_; 58 60 }; 59 61 -
trunk/lib/Stats.cc
r858 r859 410 410 // gp->plot(total); 411 411 412 // gp->command("unset multiplot");413 414 412 return filename; 415 413 } … … 429 427 // gp->command("set key height 2"); 430 428 // gp->linetitle(ss.str()); 431 // gp->linestyle("steps 2");432 // gp->plot(x);429 gp.fgcolour(255,255,0); 430 gp.plot(x); 433 431 434 432 ss.str(""); … … 437 435 // gp->command("set key height 4"); 438 436 // gp->linetitle(ss.str()); 439 // gp->linestyle("steps 3");440 // gp->plot(x);437 gp.fgcolour(0,0,255); 438 gp.plot(x); 441 439 442 440 ss.str(""); … … 445 443 // gp->command("set key height 6"); 446 444 // gp->linetitle(ss.str()); 447 // gp->linestyle("steps 4");448 // gp->plot(x);445 gp.fgcolour(0,255,0); 446 gp.plot(x); 449 447 450 448 ss.str(""); … … 452 450 // gp->command("set key height 0"); 453 451 // gp->linetitle(ss.str()); 454 // gp->linestyle("steps 1");452 gp.fgcolour(255,0,0); 455 453 gp.plot(total); 456 457 // gp->command("unset multiplot");458 454 } 459 455
Note: See TracChangeset
for help on using the changeset viewer.