|
From: Dima K. <gn...@di...> - 2013-10-29 06:47:58
Attachments:
inconsistent_nan.dat
|
Hi. I'm plotting some binary data 'with image' (using the most recent gnuplot in the repo). The data has a few NaN and a few Inf values in it. I'm seeing that these points are rendered differently between otherwise-identical 'plot' and 'splot' plots. I'm attaching a sample data file that has some NaNs. The command I'm using to plot is set view map splot '/tmp/inconsistent_nan.dat' binary array=(155,5) format="%float" with image The 'plot' command is identical except using 'plot' instead of 'splot'. At full zoom-out, the 'splot' draws NaN in white, -inf in black and +inf in yellow. The colors autoscale, so these mappings were done by drawing -inf with the lowest-range color, +inf with the highest-range color, and nan as transparent. The 'splot' version just sets the infs and the nans to 0. This lies in the middle of the range for this dataset, so the rendering is roughly red. I'm not against either of these behaviors, but I think them being different is a bug. Thoughts? dima |
|
From: Ethan A M. <sf...@us...> - 2013-10-29 17:16:24
|
On Monday, 28 October, 2013 23:32:10 Dima Kogan wrote: > Hi. > > I'm plotting some binary data 'with image' (using the most recent > gnuplot in the repo). The data has a few NaN and a few Inf values in it. > I'm seeing that these points are rendered differently between > otherwise-identical 'plot' and 'splot' plots. > > I'm attaching a sample data file that has some NaNs. The command I'm > using to plot is > > set view map > splot '/tmp/inconsistent_nan.dat' binary array=(155,5) format="%float" with image > > The 'plot' command is identical except using 'plot' instead of 'splot'. > > At full zoom-out, the 'splot' draws NaN in white, -inf in black and +inf > in yellow. The colors autoscale, so these mappings were done by drawing > -inf with the lowest-range color, +inf with the highest-range color, and > nan as transparent. > > The 'splot' version just sets the infs and the nans to 0. This lies in > the middle of the range for this dataset, so the rendering is roughly > red. > > I'm not against either of these behaviors, but I think them being > different is a bug. Thoughts? The demo file "imageNaN.dem" shows that the handling is the same in 2D and 3D for at least some cases. Your example must hit some other code path..... Yup. Simple bug failing to handle the case where the color information is in column 4 rather than column 3. Look for a fix soon. Ethan |
|
From: Dima K. <gn...@di...> - 2013-10-30 05:20:36
|
Ethan A Merritt <sf...@us...> writes: > On Monday, 28 October, 2013 23:32:10 Dima Kogan wrote: >> >> I'm not against either of these behaviors, but I think them being >> different is a bug. Thoughts? > > Look for a fix soon. Hi Ethan. I tested the code after your commit, and it appears to fix the issue. Thank you very much. I'm now seeing another related, but new problem. The coloring of the +inf/-inf is now the same in every configuration I tested (black, yellow). The coloring of the nan, however can vary. I looked at 3 different terminals: x11, wxt, qt. For each, I ran the test script posted earlier in this thread. I did a 2d plot, an splot with 'set view map' and an splot with a 3d view. The colors of the nan were as follows: | | splot, view map | splot, 3d view | plot | |-----+-----------------+----------------+-------------| | x11 | ** black ** | white | ** black ** | | wxt | white | white | white | | qt | white | white | white | Here "white" really means "transparent". A quick glance suggests there may be a bug in the x11 terminal. What do you think? Thanks again. dima |
|
From: sfeam <sf...@us...> - 2013-10-30 06:28:16
|
On Tuesday, 29 October 2013 10:20:27 PM Dima Kogan wrote: > Ethan A Merritt <sf...@us...> writes: > > > On Monday, 28 October, 2013 23:32:10 Dima Kogan wrote: > >> > >> I'm not against either of these behaviors, but I think them being > >> different is a bug. Thoughts? > > > > Look for a fix soon. > > Hi Ethan. I tested the code after your commit, and it appears to fix the > issue. Thank you very much. > > I'm now seeing another related, but new problem. The coloring of the > +inf/-inf is now the same in every configuration I tested (black, > yellow). The coloring of the nan, however can vary. > > I looked at 3 different terminals: x11, wxt, qt. For each, I ran the > test script posted earlier in this thread. I did a 2d plot, an splot > with 'set view map' and an splot with a 3d view. The colors of the nan > were as follows: > > | | splot, view map | splot, 3d view | plot | > |-----+-----------------+----------------+-------------| > | x11 | ** black ** | white | ** black ** | > | wxt | white | white | white | > | qt | white | white | white | > > Here "white" really means "transparent". A quick glance suggests there > may be a bug in the x11 terminal. What do you think? As you say, it's supposed to be transparent. But x11 doesn't do transparency, so transparent pixels come out as black in image/rgbimage mode. As shown in the imageNaN demo, if you use "failsafe" image mode then gnuplot can work around the lack of alpha channel support by simply not drawing that pixel at all. That works for your test case also. So no, I don't think there is a bug. Ethan > > Thanks again. > > dima > > > ------------------------------------------------------------------------------ > Android is increasing in popularity, but the open development platform that > developers love is also attractive to malware creators. Download this white > paper to learn more about secure code signing practices that can help keep > Android apps secure. > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
From: Dima K. <gn...@di...> - 2013-10-30 06:43:55
|
sfeam <sf...@us...> writes: > On Tuesday, 29 October 2013 10:20:27 PM Dima Kogan wrote: >> Ethan A Merritt <sf...@us...> writes: > > As shown in the imageNaN demo, if you use "failsafe" image mode > then gnuplot can work around the lack of alpha channel support by > simply not drawing that pixel at all. That works for your test case also. > > So no, I don't think there is a bug. OK. Thanks again. |