bugGNU Octave - Bugs: bug #57264, [Wish] legend text could be placed...

 
 

bug #57264: [Wish] legend text could be placed on the same baseline

Submitter:  Rik <rik5>
Submitted:  Tue 19 Nov 2019 01:37:01 AM UTC
   
 
Category:  Plotting Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 19 Nov 2019 04:44:29 PM UTC, comment #4: 

The original issue is fixed, but since there is some discussion of another issue, along with screenshots and file attachments, I am going to re-purpose this report.

I have re-titled the report to be about the legend text be placed on the same baseline, and have made this a Feature Request.  This doesn't need to be fixed immediately, if ever.

Rik <rik5>
Group administrator
Tue 19 Nov 2019 04:11:14 PM UTC, comment #3: 

Yes, I noticed that but I don't think we have any way to know the position of the actual ascent/descent of the text (from the interpreter, we only have access to the total extent). I also tested the following in Matlab online:


plot (rand (4))
legend ("a", "p", "a^2", "a_2", "orientation", "horizontal")


So they are able to track the baseline for simple texts but not for text formated ones (see attached screenshot)


Pantxo Diribarne <pantxo>
Group Member
Tue 19 Nov 2019 03:52:50 PM UTC, comment #2: 

The line heights are now equal which is great.  Is it also possible to have the text at the same level?

The results for Matlab

file matlab_abcd_legend.png

show that the text uses the same baseline

The result for Octave

file octave_abcd_legend.png

show that the text rises and falls based on what letter is used.




Rik <rik5>
Group administrator
Tue 19 Nov 2019 10:18:21 AM UTC, comment #1: 

I pushed the folloxing cset:

http://hg.savannah.gnu.org/hgweb/octave/rev/a984e6722601

Marking ready for test.

Pantxo Diribarne <pantxo>
Group Member
Tue 19 Nov 2019 01:37:01 AM UTC, original submission:  

The lines which make up the key of the legend object are placed at different heights depending on what the text is.  Ideally, all the lines should be at the same height.

Code I used for testing is attached and also presented here:


plot (rand (3,4));
legend ({'a','b','c','d'}, 'location', 'north', 'orientation', 'horizontal')
print legend.png


For what it's worth, this is not a regression.  The existing code messes this up as well.

Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47897:  legend_ml_baseline.png added by pantxo (1KiB - image/png)
file #47894:  matlab_abcd_legend.png added by rik5 (1KiB - image/png)
file #47895:  octave_abcd_legend.png added by rik5 (994B - image/png)
file #47889:  tst_legcenter.m added by rik5 (114B - text/x-matlab)
file #47890:  legend.png added by rik5 (15KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-19 rik5 Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Item GroupIncorrect Result Feature Request
        StatusReady For Test Confirmed
        Summarylegend lines are placed at different heights depending on associated text [Wish] legend text could be placed on the same baseline
    2019-11-19 pantxo Attached File- Added legend_ml_baseline.png, #47897
    2019-11-19 rik5 Attached File- Added matlab_abcd_legend.png, #47894
        Attached File- Added octave_abcd_legend.png, #47895
    2019-11-19 pantxo StatusConfirmed Ready For Test
    2019-11-19 rik5 Attached File- Added tst_legcenter.m, #47889
        Attached File- Added legend.png, #47890
        Carbon-Copy- Added pantxo

    Back to the top

    Powered by Savane 3.14-8eb0.
    Corresponding source code