From: sfeam <sf...@us...> - 2017-09-01 14:48:12
|
On Thursday, 31 August 2017 23:51:37 Dima Kogan wrote: > sfeam <sf...@us...> writes: > > > On Thursday, 31 August 2017 22:44:01 Dima Kogan wrote: > >> Hi. I just stumbled on another bug with rgbimages. If somebody knows > >> what's causing it, that'd be appreciated. > > > > This is a very complicated one. > > I'll look at it in more detail over the weekend. Never mind. I realized the problem overnight. The "with image" family of plot styles (image rgbimage rgbalpha) use a terminal-specific bitmap display routine if the terminal provides one. This can be much faster than sending the pixels one-by-one. But that only works correctly for linear coordinates, because the only information sent is basically "fill this rectangle with this bitmap". You have nonlinear axes so you need to fall back to calculating the pixel coordinates individually. The keyword for this is "pixels". So this morning's test is: set xrange [-120:-80] noextend set yrange [20:60] noextend plot "montage_40_-99_1300miles_4.png" \ binary filetype=png flipy axes x2y2 with rgbimage pixels notitle, \ $POINT axes x2y2 with points pt 1 ps 2 That seems to work correctly (although slower). I moved the "axes x2y2" to match what the documentation shows but I didn't test whether that makes any difference by itself. Probably not since the original command was accepted with no warning. I put the point in a data block because I wanted to be able to try various refresh/replot commands but again I didn't test whether it makes any difference by itself. Probably not. > > For now I'll just note: > > > > - The script basically does not work with 5.2 or current cvs, so I assume > > you are using 5.0? > > I was using "gnuplot 5.1 patchlevel 0", but it wasn't a release. It was > built from the latest sources as of 2016/11/18. I just tried on the > latest sources, and the problem is mostly the same. > > > > - To make the script work with 5.2 I can move the range outside the plot command: > > > > set xrange [-120:-80] > > set yrange [20:60] > > plot "montage_40_-99_1300miles_4.png" binary filetype=png flipy ... > > Yep. I had to do this to make it work with the latest sources. Does that > make sense? This smells like a bug too. Yeah. I was going to package up a final 5.2 release this weekend, but now I'd like to pin that down first, if only to add it as a "known problem" in the release notes. Ethan |