Changeset 1327
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Graph.cc
r1325 r1327 3 3 /* 4 4 Copyright (C) 2009, 2010 Jari Häkkinen, Peter Johansson 5 Copyright (C) 2011 Peter Johansson 5 6 6 7 This file is part of svndigest, http://dev.thep.lu.se/svndigest … … 38 39 Graph::Graph(const std::string& filename, const std::string& format) 39 40 #ifdef HAVE_PLPLOT 40 : plots_(0), pls_(1,1,format.c_str(),filename.c_str()), timeformat_("%y-%b"),41 : plots_(0), pls_(1,1,format.c_str(),filename.c_str()), 41 42 title_(filename), xmin_(0.0), xmax_(0.0), ymin_(0.0), ymax_(0.0) 42 43 { … … 108 109 std::string xopt("bcnstv"); 109 110 if (date_xticks()) { 110 pls_.timefmt( timeformat_.c_str());111 pls_.timefmt("%y-%b"); 111 112 xopt="bcnstd"; 112 113 } 113 114 114 unsigned int ytickspacing=tick_spacing(yrange_); 115 unsigned int xtickspacing=tick_spacing(xrange_); 116 pls_.box(xopt.c_str(), xtickspacing, 1, "bcnstv", ytickspacing, 2); 115 pls_.box(xopt.c_str(), 0, 1, "bcnstv", 0, 2); 117 116 pls_.lab("Date", "Number of lines", title_.c_str()); 118 117 } … … 232 231 233 232 234 void Graph::timeformat(const std::string& format)235 {236 timeformat_=format;237 }238 239 240 233 const std::vector<time_t>& Graph::xticks(void) 241 234 { -
trunk/lib/Graph.h
r1287 r1327 127 127 128 128 /** 129 \brief Set x-axis tick value format to \a format. The format is130 only used when dates are used.131 129 */ 132 void timeformat(const std::string& format);133 134 130 static const std::vector<time_t>& xticks(void); 135 131 … … 168 164 static svn_revnum_t rev_min_; 169 165 static svn_revnum_t rev_max_; 170 std::string timeformat_;171 166 std::string title_; 172 167 static std::vector<time_t> xticks_;
Note: See TracChangeset
for help on using the changeset viewer.