Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3106
| From | Ethan A Merritt <sfeam@users.sourceforge.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: line 0: warning: Skipping data file with no valid points(gnuplot) |
| Date | 2015-10-12 16:30 -0700 |
| Organization | gnuplot development |
| Message-ID | <mvhfmh$qdj$1@dont-email.me> (permalink) |
| References | <00007e50-135d-46d6-b1fc-7d088a4c09e0@googlegroups.com> |
Marcello Chiurazzi wrote:
> I have a problem using gnupolot from a c++ source code.
> The error is this:line 0: warning: Skipping data file with no valid points
>
> The code is this:
> char * commandsForGnuplot[] = {"set title \"ThumbRest\"","plot
> [0:6][-8.0:8.0] 'Thumb_R_1' with linespoints lc rgb 'black', 'Thumb_R_2'
> with linespoints lc rgb 'green', 'Thumb_R_3' with linespoints lc rgb
> 'blue', 'Thumb_R_4' with linespoints lc rgb 'red'"};
>
> for (int l=0;l<NUM_POINTS;l++)
> {
> xvals[l]=((6)*(l+1))/(double)NUM_POINTS;
> }
> FILE * temp1 = fopen("Thumb_R_1", "w");
> FILE * temp2 = fopen("Thumb_R_2", "w");
> FILE * temp3 = fopen("Thumb_R_3", "w");
> FILE * temp4 = fopen("Thumb_R_4", "w");
> /*Opens an interface that one can use to send
> commands as if they were typing into the
> * gnuplot command line. "The -persistent"
> keeps the plot open even after your
> * C program terminates.
> */
> FILE * gnuplotPipe = popen ("gnuplot -persistent",
> "w"); int i;
> for (i=0; i < NUM_POINTS; i++)
> {
> fprintf(temp1, "%g %g \n", xvals[i] ,
> position_4f[4*i]); //Write the data to a
> temporary file fprintf(temp2, "%g %g \n",
> xvals[i] , position_4f[1+4*i]); //Write the data
> to a temporary file fprintf(temp3, "%g %g \n",
> xvals[i] , position_4f[2+4*i]); //Write the data
> to a temporary file fprintf(temp4, "%g %g \n",
> xvals[i] , position_4f[3+4*i]); //Write the data
> to a temporary file
> }
> for (i=0; i < NUM_COMMANDS; i++)
> {
> fprintf(gnuplotPipe, "%s \n",
> commandsForGnuplot[i]); //Send commands to gnuplot
> one by one. }
>
> The plot is a traiectory followed by a robot,this traiectory is randomic
> because i set the pose to reach and the system define the traiectory,so
> the error is randomic too(sometimes i have it,sometimes no). I would like
> to understand what is this error(warning).
I suspect it would be a good idea to close your temp files before trying
to read them from another program (in this case gnuplot).
On the other hand, maybe one of your files really is empty?
Ethan
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
line 0: warning: Skipping data file with no valid points(gnuplot) Marcello Chiurazzi <chiurazzi.marcello@gmail.com> - 2015-10-11 03:11 -0700
Re: line 0: warning: Skipping data file with no valid points(gnuplot) Karl-Friedrich Ratzsch <mail.kfr@gmx.net> - 2015-10-11 13:01 +0200
Re: line 0: warning: Skipping data file with no valid points(gnuplot) Marcello Chiurazzi <chiurazzi.marcello@gmail.com> - 2015-10-12 15:38 -0700
Re: line 0: warning: Skipping data file with no valid points(gnuplot) Ethan A Merritt <sfeam@users.sourceforge.net> - 2015-10-12 16:30 -0700
Re: line 0: warning: Skipping data file with no valid points(gnuplot) Marcello Chiurazzi <chiurazzi.marcello@gmail.com> - 2015-10-13 00:33 -0700
Re: line 0: warning: Skipping data file with no valid points(gnuplot) Marcello Chiurazzi <chiurazzi.marcello@gmail.com> - 2015-10-13 00:42 -0700
csiph-web