bugGNU Octave - Bugs: bug #42554, changing legend location affects...

 
 

bug #42554: changing legend location affects positions of subplots

Submitter:  sergey plotnikov <nul0m>
Submitted:  Sun 15 Jun 2014 12:00:18 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 09 Feb 2015 10:55:23 PM UTC, comment #2: 

Hi,

There were other issues with subplots so I have pushed a larger changeset [1] that also fixes the issue here.

Thanks for your patch anyway.

[1] http://hg.savannah.gnu.org/hgweb/octave/rev/8064b5cdbc11

Pantxo Diribarne <pantxo>
Group Member
Wed 16 Jul 2014 10:11:00 AM UTC, comment #1: 

It seems that we need to unify units across subplots before setting tight- and looseinset шт subplot_align () subfunction of subplot ().

The patch I've attached solves the problem for me.

(file #31727)

sergey plotnikov <nul0m>
Sun 15 Jun 2014 12:00:18 AM UTC, original submission:  

Something goes wrong when I try to change legend location in the following example:


% new figure
figure;
% subplot 1
sph1 = subplot(1,2,1);
ph = plot(sin(1:12)');
% subplot 2
sph2 = subplot(1,2,2);
ph = plot(sin(1:12)');
lh = legend('some leg');
title('some title');
get([sph1,sph2],'position')
% ta-daa
set(lh,'location','southWest');
get([sph1,sph2],'position')


As you can see from the output below, positions of both subplots are being screwed up:


ans =
{
  [1,1] =
     0.13000   0.11000   0.31500   0.78524
  [2,1] =
     0.59000   0.11000   0.31500   0.78524
}
ans =
{
  [1,1] =
     33.628   18.938  -52.026  -35.226
  [2,1] =
     34.088   18.938  -52.026  -35.226
}



sergey plotnikov <nul0m>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31727:  bug42554.patch added by nul0m (823B - text/x-patch)

 

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 nul0m (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-09 pantxo StatusNone Fixed
        Open/ClosedOpen Closed
    2014-07-16 nul0m Attached File- Added bug42554.patch, #31727

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code