From: Dima K. <gn...@di...> - 2019-01-30 18:19:32
|
Hi. I'm seeing a strange behavior. I THINK it's a bug, but maybe not? Note that the below is about "with image": we have z vs. (x,y) and NOT "with rgbimage" where we have (r,g,b) vs (x,y). I can plot a simple 3x3 grid of data: set view map splot '-' matrix notitle with image 0.0 1.0 4.0 1.0 2.0 5.0 4.0 5.0 8.0 e This works, and uses the default implicit x and y ranges: integers starting at 0. I can adjust this with "using". For instance I can linearly scale the x axis like this: set view map splot '-' matrix using ($1*10):2:3 notitle with image 0.0 1.0 4.0 1.0 2.0 5.0 4.0 5.0 8.0 e This works too. I can also feed in binary data instead of ascii. The example without "using" looks like this: set view map splot '-' binary array=(3,3) format="%double" notitle with image [ binary data ] (I'm omitting the actual data here; the functional version including the data is in the attachment). This works too, and produces the same plot, as expected. However, if I try to scale the x axis with the "using" clause as before, it does NOT work: set view map splot '-' binary array=(3,3) format="%double" using ($1*10):2:3 notitle with image [ binary data ] (again, the full script is attached). In the binary-no-using case I see gnuplot try to read 72 bytes of binary data. This makes sense since 72 = 3*3*sizeof(double). In the binary-using case, however, I see gnuplot try to read 216 bytes intead. this is 72*3. But there aren't that many bytes available, so it barfs. As I user I was not expecting this, especially since the other 3 cases work. Thoughts? |