From: Shigeharu T. <sh...@ie...> - 2008-11-23 10:56:40
|
shige 11/23 2008 ---------------- I don't know the new syntax 'binary general' in gnuplot-4.3 well, there seems to be some problems on my environment: Sun Ultra 10 + Solaris 9 + gcc-3.4.3. I used the binary data (5*5*3*8=600byte) made by the followings: int main(void) { int xi,yi,Xn=5,Yn=5; double dx,dy,x,y,z,Xmin=-1.0,Xmax=5.0,Ymin=3.0,Ymax=7.0; /* xrange=[-1.0:5.0], yrange=[3.0:7.0] */ dx=(Xmax-Xmin)/(Xn-1); /* dx=1.2 */ dy=(Ymax-Ymin)/(Yn-1); /* dy=1.0 */ y=Ymin; for(yi=1;yi<=Yn;yi++,y+=dy){ x=Xmin; for(xi=1;xi<=Xn;xi++,x+=dx){ z=x*sin(y); fwrite(&x,sizeof(double),1,stdout); fwrite(&y,sizeof(double),1,stdout); fwrite(&z,sizeof(double),1,stdout); } } return 0; } 1) The followings works well: splot 'data' binary format="%double%double%double" record=5x5 w lp or set datafile binary record=5x5 splot 'data' binary format='%double%double%double' w lp But, the followings makes an unexpected graph: set datafile binary format='%double%double%double' splot 'data' binary record=5x5 w lp or set datafile binary format='%double%double%double' record=5x5 splot 'data' binary record=5x5 w lp 2) To get the same plot as 1), I tried to set datafile binary array=5x5 dx=1.2 dy=1.0 origin=(-1.0,3.0,0.0) splot 'data' binary format='%*2double%double' using ::1 w lp But the graph has z value 0 at any (x,y). 3) The following setting make core dump on our environment: set datafile binary array=5x5 set datafile binary format='%*2double%double' or set datafile binary array=5x5 format='%*2double%double' The failure does not need the {s}plot command. +========================================================+ Shigeharu TAKENO NIigata Institute of Technology kashiwazaki,Niigata 945-1195 JAPAN sh...@ie... TEL(&FAX): +81-257-22-8161 +========================================================+ |