Changeset 1325 for trunk/test/graph.cc
- Timestamp:
- Jan 23, 2011, 8:22:57 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/graph.cc
r1194 r1325 28 28 #include <ostream> 29 29 30 #include <plplot/plplotP.h> 31 #include <plplot/qsastime.h> 32 30 33 using namespace theplu::svndigest; 31 34 … … 56 59 test_graph("pdf", suite); 57 60 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 58 115 return suite.exit_status(); 59 116 } … … 76 133 graph.current_color(255, 0, 0); 77 134 SumVector data; 135 graph.rev_max(100); 78 136 data.set(99,1); 79 // std::vector<unsigned int> data(100,1);80 137 graph.plot(data, "label", 1); 81 138 }
Note: See TracChangeset
for help on using the changeset viewer.