bugGNU Octave - Bugs: bug #46546, gnuplot legend text aligns right...

 
 

bug #46546: gnuplot legend text aligns right by default

Submitted by:  Cillian O'Driscoll <odrisci>
Submitted on:  Thu 26 Nov 2015 03:53:58 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: Ben Abbott <bpabbott>
Originator Name: Cillian O'DriscollOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 18 Dec 2015 08:32:58 PM UTC, comment #2:

I tested a second time. This is a minor change, so need pressing need for confirmation. I'll close the report. If there is a problem it can be reopened.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 17 Dec 2015 11:00:54 PM UTC, comment #1:

I've pushed the changeset with some minor edits.

http://hg.savannah.gnu.org/hgweb/octave/rev/8020eceafaf0

I've tested it with "demo legend", but will wait on futher tests/confirmation before closing.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 26 Nov 2015 03:53:58 PM UTC, original submission:

When attaching a legend to a plot using the gnuplot graphics_toolkit, the text is always right aligned, even if the option "right" is specified so that the text is to the right of the keys. In Matlab, and apparently with the FLTK graphics_toolkit, the text is left aligned when the text is to the right of the keys.

http://stackoverflow.com/questions/25017514/set-legend-texts-horizontalalignment-to-left-in-octave

Simple code to reproduce:

This can be easily fixed using the attached patches (for v 4.0.0 and for the latest development branch, i.e. after the file _go_draw_axes_.m was renamed _gnuplot_draw_axes_.m). I'm not overly familiar with the Octave source, so apologies if the patch isn't up to scratch.

The above code snippet generates the attached sincos_bad.png. After applying the patch, the output generated is shown in sincos_good.png

Version information:

Cillian O'Driscoll <odrisci>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #35561:  sincos_bad.png added by odrisci (31KiB - image/png)
file #35562:  octave_legend_align_4-0-0.patch added by odrisci (856B - application/octet-stream)
file #35563:  sincos_good.png added by odrisci (31KiB - image/png)
file #35564:  octave_legend_align.patch added by odrisci (861B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by odrisci (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 18 Dec 2015 08:32:58 PM UTCbpabbottStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 17 Dec 2015 11:00:54 PM UTCbpabbottStatusNone=>Ready For Test
      Assigned toNone=>bpabbott
      Release4.0.0=>dev
      Operating SystemMac OS=>Any
    Thu 26 Nov 2015 03:53:58 PM UTCodrisciAttached File-=>Added sincos_bad.png, #35561
      Attached File-=>Added octave_legend_align_4-0-0.patch, #35562
      Attached File-=>Added sincos_good.png, #35563
      Attached File-=>Added octave_legend_align.patch, #35564

    Back to the top


    Powered by Savane 3.1-cleanup1