Changeset 863 for trunk/lib/Graph.cc
- Timestamp:
- Nov 20, 2009, 7:21:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Graph.cc
r860 r863 28 28 29 29 Graph::Graph(const std::string& filename) 30 : plots_(0), pls_(1,1,"svg",filename.c_str()) 30 31 { 31 pls_.sdev("svg");32 pls_.s fnam(filename.c_str());32 // we use colour map 0 position 0 for background colour 33 pls_.scolbga(230,230,230,1); 33 34 pls_.init(); 34 35 pls_.adv(0); … … 48 49 49 50 50 void Graph:: fgcolour(unsigned char r, unsigned char g, unsigned char b)51 void Graph::current_colour(unsigned char r, unsigned char g, unsigned char b) 51 52 { 52 pls_.rgb(r,g,b); 53 // we use colour map 0 position 1 for current colour 54 pls_.scol0a(1,r,g,b,1.0); 55 pls_.col0(1); 53 56 } 54 57 … … 57 60 { 58 61 pls_.wind(0, x.size(), 0, yrange_); 59 pls_.box("bcnstv", 10, 1, "bcnstv", yrange_/5, 1); 62 if (!plots_) { 63 // draw plot frame, x and y ticks only for the first plot 64 pls_.scol0a(2,0,0,0,1.0); 65 pls_.col0(2); 66 pls_.box("bcnstv", 10, 1, "bcnstv", yrange_/5, 1); 67 pls_.col0(1); 68 } 69 ++plots_; 60 70 for (unsigned int i=1; i<x.size(); ++i) { 61 71 pls_.join(i-1,x[i-1],i-1,x[i]);
Note: See TracChangeset
for help on using the changeset viewer.