bugGNU Octave - Bugs: bug #29373, Feature Request: support for...

 
 

bug #29373: Feature Request: support for position attribute for labels

Submitter:  Michael Duelli <duelli>
Submitted:  Mon 29 Mar 2010 05:01:09 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  Wont Fix Assigned to:  bpabbott
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 11 Jan 2014 01:45:01 PM UTC, comment #10: 

We now have both an FLTK toolkit and QtHandles being added to the developers sources.  Both of these toolkits allow the text objects to be positioned.

Ben Abbott <bpabbott>
Group Member
Sun 29 Jul 2012 03:07:37 PM UTC, comment #9: 

I'm marking this as postponed, as I don't see how to add a "positionmode" property to the {x,y,z}labels and title text objects.

This assumes that approach (1) below is used.

Ben Abbott <bpabbott>
Group Member
Fri 06 Jul 2012 12:16:34 PM UTC, comment #8: 

There are two approaches to fix this for gnuplot.

(1) The axes labels may be "offset". This approach is attractive as it is tolerant in differences between Octave/Gnuplot in determining the text extents. Essentially, if the offset is the differenced between the manually specified position and the auto-positioned value. The trick here is to determine the auto-positioned value. Adding a "mode" property would be needed for the axes label text objects.


set xlabel {"<label>"} {offset <offset>} {font "<font>{,<size>}"}
                {{textcolor | tc} {lt <line_type> | default}} {{no}enhanced}
                {rotate by <degrees>}


Adding a "mode" property allows for the possibility of returning the axes label's text objects back to the "auto" mode.  A present, (both in Octave and Matlab) once the user specifies the axes position, it remains "manual" permanently.

(2) The axes labels may be treated as any other text object.  There are two problems with this approach.  First, the text position / extent information calculated by Octave does not account for the tex-markup. Second, when activepositionmode is set to "outerposition", the Gnuplot backend ignores the "position" property values.  This is effectively equivalent to the OpenGL backend setting "looseinset" to "tightinset".


set (gca, 'LooseInset', get (gca, 'TightInset'))


See the link below for info.

http://undocumentedmatlab.com/blog/axes-looseinset-property/




Ben Abbott <bpabbott>
Group Member
Thu 05 Jul 2012 12:18:17 PM UTC, comment #7: 

Just noticed that the {x,y,z}labels now have their position properties set.

With this in place using gnuplot to position the labels relative to the axes' plot box should be straight forward.

I've assigned this to myself and will work on a changeset for the default branch.

Ben Abbott <bpabbott>
Group Member
Sat 25 Feb 2012 08:47:43 PM UTC, comment #6: 

Changing the Category to "Plotting with gnuplot" since it now only affects that toolkit.

FLTK currently supports the position property, but not the margin property.

Rik <rik5>
Group administrator
Tue 18 Jan 2011 11:05:23 PM UTC, comment #5: 

I'm not sure we should put much effort into the gnuplot backend in this case.

David made an attempt to implement the text extents for gnuplot and use the information to render the legend in the same manner it is done for the OpenGL backend.

The result was unsatisfactory (I assume because Octave and gnuplot calculated the extents differently). We then decided to handle the legend the gnuplot way (using gnuplot's key). Also we implemented the position/outerposition properties in a gnuplot way.

Since gnuplot includes the ability to offset the axis labels from their default positions, we might also implement this feature in gnuplot way.

If the default axis label positions were known, that information could be used to determine an offset value from the default. It would be simple to change the gnuplot backend to add the offset.

Thoughts?

Ben Abbott <bpabbott>
Group Member
Tue 18 Jan 2011 10:45:06 PM UTC, comment #4: 

Currently the fltk backend supports setting the position of axes labels manually. The gnuplot backend still doesn't.

Konstantinos Poulios <logari81>
Mon 26 Apr 2010 06:52:36 PM UTC, comment #3: 

Per Ben's comment, I have updated this bug report to be "In Progress".  I also changed the subject to match the needed coding task which is support for the position attribute.

Rik <rik5>
Group administrator
Mon 26 Apr 2010 05:45:35 PM UTC, comment #2: 

The text objects associated with the x/y/z labels each have a "position" property. Presently, neither of the backends use this property.

However, the fltk backend does set the value for the labels' positions. So it appears the work has begun to handle this.

Ben Abbott <bpabbott>
Group Member
Sun 25 Apr 2010 04:30:07 AM UTC, comment #1: 

Margin is actually used to pad the text extent box and helps determine the size of any surrounding border.  For positioning you could normally use the position property, but support doesn't seem to have been coded yet for labels, only text objects.

I'm going to mark this as confirmed since margins don't work and put this as a wish list item for support to be added.

Rik <rik5>
Group administrator
Mon 29 Mar 2010 05:01:09 PM UTC, original submission:  

Just tried

y = ylabel('test')

(BTW, return value of ylabel is not documented!)

Calling get(y) tells me that there is a 'margin' setting which I interpreted as the distance to the axes.

However, setting 'margin' to any value seems not to change anything.

E.g.

set(y, 'margin', 10)

Michael Duelli <duelli>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by logari81 (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by duelli (Submitted the item)
  • -email is unavailable- added by duelli
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-11 bpabbott StatusPostponed Wont Fix
        Open/ClosedOpen Closed
    2012-07-29 bpabbott StatusIn Progress Postponed
    2012-07-05 bpabbott Assigned toNone bpabbott
        Release3.2.4 dev
        Operating SystemGNU/Linux Any
    2012-02-25 rik5 CategoryInterpreter Plotting with gnuplot
    2010-09-16 jwe Priority5 - Normal 1 - Later
    2010-04-26 rik5 StatusConfirmed In Progress
        SummarySetting margin on labels seems not to work Feature Request: support for position attribute for labels
    2010-04-25 rik5 Item GroupIncorrect Result Feature Request
    2010-04-25 rik5 Severity3 - Normal 1 - Wish
        StatusNone Confirmed
    2010-03-29 duelli Carbon-Copy- Added duelli

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code