bugGNU Octave - Bugs: bug #50272, Wrong coordinates are displayed...

 
 

bug #50272: Wrong coordinates are displayed when an annotation is inserted

Submitter:  Roland Baudin <roland65>
Submitted:  Fri 10 Feb 2017 08:32:10 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 14 Feb 2017 07:32:32 PM UTC, comment #5: 

I pushed your patch to stable (http://hg.savannah.gnu.org/hgweb/octave/rev/0032c2f7ee4e).  This will be part of the 4.2.1 bug fix release.

Rik <rik5>
Group administrator
Mon 13 Feb 2017 04:25:29 PM UTC, comment #4: 

I tried the patch (version 2) and the coordinates are now OK.
Thanks!

Roland Baudin <roland65>
Sun 12 Feb 2017 09:31:53 PM UTC, comment #3: 

Indeed vectors are more than enough here, I attached a modified version.


(file #39743)

Pantxo Diribarne <pantxo>
Group Member
Fri 10 Feb 2017 10:48:16 PM UTC, comment #2: 

Why not use


std::vector<std::string>


rather than


std::list<std::string>


The "list" of objects is always just three strings traversed in order 1,2,3;  It doesn't seem necessary to have the full std::list overhead for such a simple object.


Rik <rik5>
Group administrator
Fri 10 Feb 2017 10:25:54 AM UTC, comment #1: 

Confirmed, for the Qt toolkit only.

I attached a patch that fixes the issue for me.


(file #39715)

Pantxo Diribarne <pantxo>
Group Member
Fri 10 Feb 2017 08:32:10 AM UTC, original submission:  

In Octave 4.2.0, using the qt graphics toolkit, the coordinates that are displayed at the bottom of a plot are wrong when a text annotation is inserted (using the menu or the annotation() function).

The coordinates are wrongly normalized within [0, 1].

Note this issue does not exist with the fltk toolkit.

To reproduce:

graphics_toolkit('qt');

% Plot a sinus ; the display coordinates are OK
close all; clear all; x=[0:0.01:2*pi]; y=sin(x); plot(x,y);

% Annotate the figure - the display coordinates are wrongly between 0 and 1
annotation("textbox",[0.5 0.5 0 0],"string","TEXT")

Roland Baudin <roland65>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39743:  omit_annot2.patch added by pantxo (3KiB - text/x-patch)
file #39715:  omit_annot.patch added by pantxo (3KiB - text/x-patch)

 

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 pantxo (Updated the item)
  • -email is unavailable- added by roland65 (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-14 rik5 StatusPatch Reviewed Fixed
        Open/ClosedOpen Closed
    2017-02-12 pantxo Attached File- Added omit_annot2.patch, #39743
    2017-02-10 rik5 StatusPatch Submitted Patch Reviewed
    2017-02-10 pantxo Attached File- Added omit_annot.patch, #39715
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code