-
Notifications
You must be signed in to change notification settings - Fork 0
/
pk.cpp
28 lines (24 loc) · 781 Bytes
/
pk.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "gnuplot-cpp/gnuplot_i.hpp"
#include<iostream>
void wait_for_key ()
{
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) // every keypress registered, also arrow keys
std::cout << std::endl << "Press any key to continue..." << std::endl;
FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
_getch();
#elif defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__)
std::cout << std::endl << "Press ENTER to continue..." << std::endl;
std::cin.clear();
std::cin.ignore(std::cin.rdbuf()->in_avail());
std::cin.get();
#endif
return;
}
using namespace std;
int main() {
Gnuplot k;
k<<"plot 'temp.txt' using 1:2:4:3:5");
k.set_style("candlesticks");
wait_for_key();
return 0;
}