bugGNU Octave - Bugs: bug #44683, wrong vertical bottom alignment of...

 
 

bug #44683: wrong vertical bottom alignment of multiline text boxes

Submitted by:  Fabio <efferre79>
Submitted on:  Wed 01 Apr 2015 08:40:36 AM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Thu 09 Apr 2015 09:09:03 PM UTC, comment #6:

Thanks Avinoam, I have replaced "length" by "numel" which is sometimes less misleading, and pushed your patch here:
http://hg.savannah.gnu.org/hgweb/octave/rev/e10ad5214a59

Closing report.

Pantxo Diribarne <pantxo>
Project Member
Thu 09 Apr 2015 03:41:02 PM UTC, comment #5:

Tested successfully with octave 3.8.2

Fabio <efferre79>
Thu 09 Apr 2015 01:13:08 PM UTC, comment #4:

Please review the attached cset.

(file #33614)

Avinoam Kalma <avinoam>
Project Member
Thu 02 Apr 2015 09:48:57 AM UTC, comment #3:

The problem is in line 1350 in __go_draw_axes__.m in octave\4.0.0-rc2\m\plot\util\private

num_lines = rows (obj.string)

obj.string = 'multiline text\nwith bottom alignment'
but
num_lines = 1

lines counting should also count \n in the string.

Avinoam Kalma <avinoam>
Project Member
Wed 01 Apr 2015 11:41:55 AM UTC, comment #2:

Hi,

Thanks for your bug report. I can confirm the bug but only using gnuplot toolkit (tested with wxt or x11 terminal). fltk works properly, i.e the alignment property refers to the whole text box not to the position of the first line.

Pantxo Diribarne <pantxo>
Project Member
Wed 01 Apr 2015 08:45:37 AM UTC, comment #1:

... and the same applies to middle alignment

text(1.5,1,sprintf('multiline text\nwith central alignment'),'verticalalignment','middle')

Fabio <efferre79>
Wed 01 Apr 2015 08:40:36 AM UTC, original submission:

I have found a problem with the vertical alignment of a multiline text box. Here is the simple code to show the problem:

t = 0:.1:2;
plot(t,ones(1,length(t)))
text(0.5,1,sprintf('multiline text\nwith bottom alignment'),'verticalalignment','bottom')
text(1.5,1,sprintf('multiline text\nwith top alignment'),'verticalalignment','top')

You can see that in the bottom alignment case the text box is aligned referencing to the first line

Fabio <efferre79>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #33614:  bug44683.cset added by avinoam (890B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by efferre79 (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
    Thu 09 Apr 2015 09:09:03 PM UTCpantxoStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Thu 09 Apr 2015 01:13:08 PM UTCavinoamAttached File-=>Added bug44683.cset, #33614
    Wed 01 Apr 2015 11:41:55 AM UTCpantxoCategoryPlotting=>Plotting with gnuplot
      StatusNone=>Confirmed
      Summarywrong vertical bottom alignment of multiline text boxes=>wrong vertical bottom alignment of multiline text boxes

    Back to the top


    Powered by Savane 3.1-cleanup1