- Timestamp:
- Mar 10, 2006, 12:19:48 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Stats.cc
r74 r76 109 109 gp->command("set key left Left reverse"); 110 110 gp->command("set multiplot"); 111 std::vector<u_int> x=accumulated(); 112 std::stringstream sa; 113 sa << x.back() << " total"; 114 double yrange_max=1.03*x.back()+1; 111 std::vector<u_int> total=accumulated(); 112 double yrange_max=1.03*total.back()+1; 115 113 gp->yrange(yrange_max); 116 gp->linetitle(sa.str());117 gp->linestyle("steps 1");118 gp->plot(x);119 114 size_t plotno=1; 120 115 for (MapConstIter_ i= map_.begin(); i != map_.end(); i++) { … … 122 117 s0 << "set key height " << 2*plotno; 123 118 gp->command(s0.str()); 124 x=accumulated(i->first);119 std::vector<u_int> x=accumulated(i->first); 125 120 std::stringstream s; 126 121 s << x.back() << " " << i->first; … … 133 128 gp->plot(x); 134 129 } 130 std::stringstream sa; 131 sa << total.back() << " total"; 132 gp->command("set key height 0"); 133 gp->linetitle(sa.str()); 134 gp->linestyle("steps 1"); 135 gp->plot(total); 136 135 137 gp->command("unset multiplot"); 136 138 gp->yrange();
Note: See TracChangeset
for help on using the changeset viewer.