Changeset 859 for trunk/lib/Graph.cc


Ignore:
Timestamp:
Nov 20, 2009, 12:15:33 AM (12 years ago)
Author:
Jari Häkkinen
Message:

Addresses #97. Improvements to summary plot.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Graph.cc

    r858 r859  
    3333    pls_.init();
    3434    pls_.adv(0);
    35     pls_.scolbg(0,100,0);
    36     pls_.rgb(255,0,0);
    3735    pls_.vsta();
    3836  }
     37
    3938
    4039  Graph::~Graph(void)
    4140  {
    4241  }
     42
    4343
    4444  bool Graph::date_xticks(void)
     
    4848
    4949
     50  void Graph::fgcolour(unsigned char r, unsigned char g, unsigned char b)
     51  {
     52    pls_.rgb(r,g,b);
     53  }
     54
     55
    5056  void Graph::plot(const std::vector<unsigned int>& x)
    5157  {
    52     pls_.wind(0, x.size(), 0, x.back());
    53     pls_.box("bcnstd", 100, 5, "bcnstv", 100, 5);
     58    pls_.wind(0, x.size(), 0, yrange_);
     59    pls_.box("bcnstv", 10, 1, "bcnstv", yrange_/5, 1);
    5460    for (unsigned int i=1; i<x.size(); ++i) {
    5561      pls_.join(i-1,x[i-1],i-1,x[i]);
     
    6773  double Graph::yrange(double ymax)
    6874  {
    69     return ymax;
     75    return yrange_=ymax;
    7076  }
    7177
Note: See TracChangeset for help on using the changeset viewer.