Re: Strange autoscaling with rgbimage and inverted yranges

Ethan A Merritt <[email protected]>
Newsgroups gmane.comp.graphics.gnuplot.devel
Organization University of Washington
Message-ID <2826311.2Jqc8VMcB9@stonelion>
On Wednesday, 9 September 2020 02:07:50 PDT Dima Kogan wrote:
> Hi. I vaguely recall mentioning this already, but I don't see it in my
> email. Apologies if this has already been reported. I have this script:
> 
>     set yrange [:] reverse
>     set size ratio -1
>     plot "/tmp/gray.jpg" binary filetype=auto flipy with rgbimage,'-'   using 1:2 notitle with points pt 3 ps 3 
[snip]
>     e
> 
> I.e. we plot some points on top of the attached image. The contents of
> the image don't matter. Here we just have a gray field. I'm using the
> latest master branch, but I belive 5.4 does this too.
> 
> 1. Running that script in an interactive terminal (I tried x11 and qt),
>    the plot pops up just fine: the autoscale considered the image AND the
>    points
> 
> 2. We interactively zoom on any area with the mouse. This works too
> 
> 3. We press 'u' to zoom out. The expectation is that we get back to the
>    full view after step 1. Instead we get to a new view, zoomed-in on
>    the points only, NOT on the image.

Hmm.  
But if you press 'p' for "previous" the unzoom works correctly.
That is probably a clue.

Also, if the inline data is replaced by a datablock the problem goes away.

I think the issue is that because your example uses in-line data it
cannot be re-read.  The program tries to work around this by reusing
the contents of the various internal data structures but in this case the
workaround fails.  Possibly fixable, but I think the primary lesson is
that data blocks are much preferred to in-line data if you are going to be
manipulating/re-drawing the plot.

	Ethan

> Something about the reverse yrange is confusing I think. Have I reported
> this already?
> 
> Thanks.




_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.