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

 
 

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

Submitter:  Fabio <efferre79>
Submitted:  Wed 01 Apr 2015 08:40:36 AM 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:  * 3.8.2 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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>
Group 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>
Group 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 Files:
   
   
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
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by efferre79 (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
    2015-04-09 pantxo StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2015-04-09 avinoam Attached File- Added bug44683.cset, #33614
    2015-04-01 pantxo CategoryPlotting 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.13-758e.
    Corresponding source code