bugGNU Octave - Bugs: bug #49621, Custom yticklabels lead to wrongly...

 
 

bug #49621: Custom yticklabels lead to wrongly placed annotations when figure is maximized

Submitted by:  None
Submitted on:  Wed 16 Nov 2016 01:16:28 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Dmitry VolosnykhOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.2
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 21 Nov 2016 01:50:52 PM UTC, comment #4:

@Dmitry:

  • comment #2: the answer is yes but you have to do it yourself (ML doesn't provide such option builtin, neither does Octave). You may want to look at "demo annotation 6" for how to map annotation coordinates to axes coordinates. Then you'll have to use "addlistener" function to change your annotation position when either the figure or the axes "position" property changes
  • comment #3: I meant that this is how it works in ML and in Octave. Now I don't pretend that this is simple to understand when you don't understand the background as much as I do. Could you suggest an improvement of the documentation to make it clear that annotation an axes coordinate systems are different and that one should not expect annotations and axes objects to stay aligned on figure/axes size changes?
Pantxo Diribarne <pantxo>
Project Member
Mon 21 Nov 2016 01:02:50 PM UTC, comment #3:

@Pantxo Saying 'all you observe is expected' do you mean that such behavior is expected from the perspective of the developer or from user's point of view. As for me, it was totally unexpected.

Dmitry Volosnykh <dvolosnykh>
Mon 21 Nov 2016 12:57:52 PM UTC, comment #2:

Is there any way to bind annotations objects positions to axes position so that calculations are re-evaluated?

Dmitry Volosnykh <dvolosnykh>
Wed 16 Nov 2016 02:31:36 PM UTC, comment #1:

Hi,

The axes position is in "normalized" units by default, as are default annotation objects. Default ticklabels are sufficiently small to not force the axes extent to be shrink. That is why maximizing does not break the annotation alignment with default labels.

Now your custom labels are too large to fit in the available space when the figure has its default size and maximizing the figure thus changes the axes position:

The annotations objects position is independent of the axes position so all you observe is expected.

Closing report as invalid.

Pantxo Diribarne <pantxo>
Project Member
Wed 16 Nov 2016 01:16:28 PM UTC, original submission:

When default yticklabels are used annotations are drawn correctly either in normal or maximized window.
Alas, with custom yticklabels annotations are draw correctly in normal window only. After window gets maximized annotations' positions are wrongly calculated.

See attached screenshots.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #38990:  default_labels_normal.png added by None (31KiB - image/png)
file #38991:  custom_labels_normal.png added by None (33KiB - image/png)
file #38992:  default_labels_maximized.png added by None (50KiB - image/png)
file #38993:  custom_labels_maximized.png added by None (54KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dvolosnykh (Posted a comment)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 16 Nov 2016 02:31:36 PM UTCpantxoStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Wed 16 Nov 2016 01:16:28 PM UTCNoneAttached File-=>Added default_labels_normal.png, #38990
      Attached File-=>Added custom_labels_normal.png, #38991
      Attached File-=>Added default_labels_maximized.png, #38992
      Attached File-=>Added custom_labels_maximized.png, #38993

    Back to the top


    Powered by Savane 3.1-cleanup1