I've made a function which successfully pipes data from my C program to gnuplot:
void gnuprintabs(FILE *gp,double **RE,double **IM, double x[], int N)
{
int i,j;
fprintf(gp, "splot '-'\n");
for (i=0; i<N; i++)
{
for(j=0; j<N; j++)
{
fprintf(gp, "%g %g %g\n", x[i],x[j],sqrt(RE[i][j]*RE[i][j]+IM[i][j]*IM[i][j]));
}
}
fflush(gp);
fprintf(gp, "e\n");
}
The function itself is in a loop whereby the 2D RE and IM arrays are continuously updated.
My question is how can I make this plot a solid surface rather than single points or lines?
If I tell gnuplot to set pm3d\n
, it returns an error:
single isoline < scan > is not enough for pm3d plot
Is there a way round this?
Thanks