[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46546] gnuplot legend text aligns right by de
From: |
Cillian O'Driscoll |
Subject: |
[Octave-bug-tracker] [bug #46546] gnuplot legend text aligns right by default |
Date: |
Thu, 26 Nov 2015 15:53:59 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?46546>
Summary: gnuplot legend text aligns right by default
Project: GNU Octave
Submitted by: odrisci
Submitted on: Thu 26 Nov 2015 03:53:58 PM GMT
Category: Plotting with gnuplot
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name: Cillian O'Driscoll
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0
Operating System: Mac OS
_______________________________________________________
Details:
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:
th = linspace( 0, 2*pi);
plot( th/pi, [ sin(th); cos(th) ] )
legend( 'Sin', 'Cos(\theta)', 'Location', 'EastOutside' )
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:
----------------------------------------------------------------------
GNU Octave Version: 4.0.0
GNU Octave License: GNU General Public License
Operating System: Darwin 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1
21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 26 Nov 2015 03:53:58 PM GMT Name: sincos_bad.png Size: 31kB By:
odrisci
<http://savannah.gnu.org/bugs/download.php?file_id=35561>
-------------------------------------------------------
Date: Thu 26 Nov 2015 03:53:58 PM GMT Name: octave_legend_align_4-0-0.patch
Size: 856B By: odrisci
<http://savannah.gnu.org/bugs/download.php?file_id=35562>
-------------------------------------------------------
Date: Thu 26 Nov 2015 03:53:58 PM GMT Name: sincos_good.png Size: 31kB By:
odrisci
<http://savannah.gnu.org/bugs/download.php?file_id=35563>
-------------------------------------------------------
Date: Thu 26 Nov 2015 03:53:58 PM GMT Name: octave_legend_align.patch Size:
861B By: odrisci
<http://savannah.gnu.org/bugs/download.php?file_id=35564>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46546>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #46546] gnuplot legend text aligns right by default,
Cillian O'Driscoll <=