Line 32... |
Line 32... |
|
|
//int plot(char in_file_name[], char out_file_name[])
|
//int plot(char in_file_name[], char out_file_name[])
|
int main (int argc, char *argv[])
|
int main (int argc, char *argv[])
|
{
|
{
|
printf("argc=%d\n",argc);
|
printf("argc=%d\n",argc);
|
if(argc!= 6) {usage(); return;}
|
if(argc!= 6) {usage(); return 1;}
|
char * in_file_name =argv[1];
|
char * in_file_name =argv[1];
|
char * out_file_name=argv[2];
|
char * out_file_name=argv[2];
|
char * x_lable =argv[3];
|
char * x_lable =argv[3];
|
char * y_lable =argv[4];
|
char * y_lable =argv[4];
|
char * key_pos = argv[5];
|
char * key_pos = argv[5];
|
Line 63... |
Line 63... |
FILE * pipe = popen ("gnuplot -persistent", "w");
|
FILE * pipe = popen ("gnuplot -persistent", "w");
|
|
|
|
|
|
|
index_num=count_index_num (in_file_name);
|
index_num=count_index_num (in_file_name);
|
if(index==0)return 1;
|
//if(index==0)return 1;
|
if(get_index_names(label,in_file_name)) return 1;
|
if(get_index_names(label,in_file_name)) return 1;
|
|
|
|
|
// sprintf(plot_cmd,"plot '%s' index 0 with linespoints ls 1 title '%s', \"\" index 1 with linespoints ls 2 title '%s', \"\" index 2 with linespoints ls 3 title '%s', \"\" index 3 with linespoints ls 4 title '%s'",in_file_name,label1,label2,label3,label4);
|
// sprintf(plot_cmd,"plot '%s' index 0 with linespoints ls 1 title '%s', \"\" index 1 with linespoints ls 2 title '%s', \"\" index 2 with linespoints ls 3 title '%s', \"\" index 3 with linespoints ls 4 title '%s'",in_file_name,label1,label2,label3,label4);
|
sprintf(plot_cmd,"plot '%s' index 0 with linespoints ls 1 title '%s'", in_file_name,label[1]);
|
sprintf(plot_cmd,"plot '%s' index 0 with linespoints ls 1 title '%s'", in_file_name,label[1]);
|