From: Dima K. <gn...@di...> - 2017-09-01 06:51:46
|
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. > 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. > - I'm not sure whether or not I see the same thing as you on zooming. > At first glance it looks to me that the zoomed-in placement is correct > (point is on top of LA) in the zoom view even though it was not in the > original full view. The closer in I zoom the closer to perfect the superposition > becomes. Is that what you see or do you see something else? That's what I see too: I zoom on an area that does NOT have the circle in it (but that SHOULD have it), and I see the zoomed circle post-zoom. > - So I guess my question is, would it be a correct description to say that > the plot is correct but only after a zoom operation? If so, that sounds > easier to track down than "it's always wrong". I can't tell. There could be a systematic error, but this is a low-res map and doesn't have enough detail. > - One possible problem occurs to me. The coordinates mapped to an > image pixel describe the center of the pixel, not a corner. > You may have constructed your mapping with that in mind, or maybe not. > If not then perhaps adjusting the mapping function will fix everything. It's true that I wasn't super careful about this distinction, but I don't see 0.5 pixels of error, I see 35 pixels of error. I was hoping that this one wouldn't be tough to track down since one would expect the rgbimage to be plotted against y2 normally, and against y2 via a mapping. But here the NORMAL y2 coordinates are becoming broken. But admittedly I haven't spent much time in looking at the sources on this one. |