Changeset 1326 for trunk


Ignore:
Timestamp:
Jan 23, 2011, 8:26:45 AM (10 years ago)
Author:
Peter Johansson
Message:

reverting r1325 for lib/graph.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/graph.cc

    r1325 r1326  
    2828#include <ostream>
    2929
    30 #include <plplot/plplotP.h>
    31 #include <plplot/qsastime.h>
    32 
    3330using namespace theplu::svndigest;
    3431
     
    5956  test_graph("pdf", suite);
    6057
    61   Graph graph("plot.png", "png");
    62 
    63   double vpwxmi = 40 * 365.25 * 24 * 60 * 60;
    64   double vpwxma = 44 * 365.25 * 24 * 60 * 60;
    65   double xtick1 = 0;
    66   int nxsub1 = 0;
    67   bool ldx = true;
    68   pldtik( vpwxmi, vpwxma, &xtick1, &nxsub1, ldx );
    69   std::cout << "xticks: " << xtick1 << std::endl;
    70   std::cout << "xticks days: " << xtick1/60/60/24 << std::endl;
    71 
    72   double factor=0;
    73   double tstart=0;
    74   double sec   = 0.;
    75   int min   = 0;
    76   int hour  = 0;
    77   int day   = 0;
    78   int month = 0;
    79   int year;
    80 
    81   std::cout << "vpwxmi: " << vpwxmi << "\n";
    82 
    83   plbtime( &year, &month, &day, &hour, &min, &sec, vpwxmi);
    84   std::cout << year << "-" << month << "-" << day << " " << hour << "\n";
    85 
    86   sec   = 0.;
    87   min   = 0;
    88   hour  = 0;
    89   day   = 0;
    90   month = 0;
    91   plctime(year, month, day, hour, min, sec, &tstart);
    92 
    93   std::cout << "tstart: " << tstart << "\n";
    94 
    95   std::cout << "vpwxmi-tstart: " << (vpwxmi-tstart)/3600 << "\n";
    96 
    97   pldtfac( vpwxmi, vpwxma, &factor, &tstart );
    98   std::cout << "tstart: " << tstart << "\n";
    99   std::cout << "factor: " << factor/60/60/24 << "\n";
    100 
    101   plbtime( &year, &month, &day, &hour, &min, &sec, tstart);
    102   std::cout << year << "-" << month << "-" << day << " " << hour
    103             << " " << min << " " << sec << "\n";
    104 
    105   plbtime( &year, &month, &day, &hour, &min, &sec, tstart+3600);
    106   std::cout << year << "-" << month << "-" << day << " " << hour
    107             << " " << min << " " << sec << "\n";
    108 
    109   plbtime( &year, &month, &day, &hour, &min, &sec, tstart+3600*24);
    110   std::cout << year << "-" << month << "-" << day << " " << hour
    111             << " " << min << " " << sec << "\n";
    112 
    113  
    114 
    11558  return suite.exit_status();
    11659}
     
    13376  graph.current_color(255, 0, 0);
    13477  SumVector data;
    135   graph.rev_max(100);
    13678  data.set(99,1);
     79  //  std::vector<unsigned int> data(100,1);
    13780  graph.plot(data, "label", 1);
    13881}
Note: See TracChangeset for help on using the changeset viewer.