bugGNU Octave - Bugs: bug #49757, Line drawing overlaying image...

 
 

bug #49757: Line drawing overlaying image fails under the gnuplot toolkit

Submitter:  Dan Sebald <sebald>
Submitted:  Fri 02 Dec 2016 10:27:15 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 13 Dec 2017 04:52:41 PM UTC, comment #3: 

The code example in the original submission now works on the development branch.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Sun 04 Dec 2016 05:23:05 AM UTC, comment #2: 

I've identified where the problem is.  Redirecting the output shows the following plot command:


plot "-" binary array=100x100 scan=yx origin=(1,1) dx=1 dy=1 using 1 title "" with image; \
if (GPVAL_TERM eq "qt") unset obj 1;
plot "-" binary format='%float64' record=5 using ($1):($2) axes x1y1 title "" with points linestyle 10 \
;


That should be a single "plot", e.g.,


if (GPVAL_TERM eq "qt") unset obj 1;
plot "-" binary array=100x100 scan=yx origin=(1,1) dx=1 dy=1 using 1 title "" with image, \
     "-" binary format='%float64' record=5 using ($1):($2) axes x1y1 title "" with points linestyle 10 \
;


The logic for constructing the command must be wrong.  I'll look at this at a later time.

Dan Sebald <sebald>
Sat 03 Dec 2016 01:42:10 PM UTC, comment #1: 

Confirmed on Win7 with 4.3.0+.
The first plot command after "hold on" turns the image into a black square with only the upper part of leftmost column showing some white pixels (unrelated to "im" picture).

Philip Nienhuis <philipnienhuis>
Group Member
Fri 02 Dec 2016 10:27:15 PM UTC, original submission:  

From bug https://savannah.gnu.org/bugs/?49756 is a script that causes a gnuplot failure:


graphics_toolkit gnuplot
figure(1),clf
im=uint8(rand(100,100)*255);
imshow(im)
hold on;
xs=[0 0 1 1 0];ys=[0 1 1 0 0];
xoff=xs-0.5;yoff=ys-0.5;
offset=50;
plot(xs+offset,ys+offset,'rx')
plot(xoff*0.75+0.5+offset,yoff*0.75+0.5+offset,'b')
hold off;


The image draws fine, but then the plot following "hold on" fails.

Dan Sebald <sebald>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by sebald (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-12-13 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2016-12-03 philipnienhuis StatusNone Confirmed
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code