bugGNU Octave - Bugs: bug #40480, subplot('position',...) clears plot

 
 

bug #40480: subplot('position',...) clears plot

Submitter:  Muhali <muhali>
Submitted:  Tue 05 Nov 2013 12:29:30 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  rik5
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
   

Jump to the original submission

Fri 08 Nov 2013 04:05:42 PM UTC, comment #8: 

sorry. I had an old private subplot function lying around.

Muhali <muhali>
Fri 08 Nov 2013 02:55:21 PM UTC, comment #7: 

Just checked and it still works for me.  This is on a Linux system with FLTK-1.3.0.  Have you tried cloning from the Mercurial repository to a new directory and building from this fresh tree?  It is possible that your system has built up cruft.

I tried the other examples in this bug report and they also still work for me.

Rik <rik5>
Group administrator
Fri 08 Nov 2013 09:00:50 AM UTC, comment #6: 

With that change included the original example still doesn't work for me.

I am at changeset:   17882:cf3f828f401c

Muhali <muhali>
Wed 06 Nov 2013 07:16:00 PM UTC, comment #5: 

Should be fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/93edd282a2bc).  It will make it in to the 3.8 release.

Rik <rik5>
Group administrator
Wed 06 Nov 2013 01:29:12 AM UTC, comment #4: 

subplot('position', [0.100   0.100   0.800   0.800]);
subplot('position', [0.300   0.300   0.200   0.200]);


If this produces two axes, then at least I know how to proceed.
Not sure what you mean by 2 axes? 2subplots?
If so, the answer is no.

2 jpg's are attached:
subplot3.jpg is after first call
subplot4.jpg is after second call



Michael Godfrey <godfrey>
Group Member
Tue 05 Nov 2013 11:35:49 PM UTC, comment #3: 

Interesting, does Matlab not bother to check whether plots overlap?

How about this code?


subplot('position', [0.100   0.100   0.800   0.800]);
subplot('position', [0.300   0.300   0.200   0.200]);


If this produces two axes, then at least I know how to proceed.

Rik <rik5>
Group administrator
Tue 05 Nov 2013 09:42:09 PM UTC, comment #2: 

First case: 2 subplots (0-1)

>> h1 = subplot('position', [0.100   0.525   0.800   0.375]);
>> get (h1, 'outerposition')


ans =

   -0.1105    0.4313    1.0526    0.5208

>> h2 = subplot('position', [0.100   0.100   0.800   0.375]);
>> get (h2, 'outerposition')


ans =

   -0.1105    0.0063    1.0526    0.5208

>>

===================
Second case:

>> close
>> subplot('position', [0.100   0.525   0.800   0.375]);
>> subplot('position', [0.100   0.100   0.800   0.424]);
>>

2 subplots are drawn, but they overlap in the middle
of the y-axis, so they do not look usable.
subplot2.jpg is attached


Michael Godfrey <godfrey>
Group Member
Tue 05 Nov 2013 09:31:01 PM UTC, comment #1: 

I have a fix for this, but I'd like a bit more information.  Can you try the following in Matlab?


h1 = subplot('position', [0.100   0.525   0.800   0.375]);
get (h1, 'outerposition')
h2 = subplot('position', [0.100   0.100   0.800   0.375]);
get (h2, 'outerposition')


And also


subplot('position', [0.100   0.525   0.800   0.375]);
subplot('position', [0.100   0.100   0.800   0.424]);


In the second case, does the first axis disappear?

Rik <rik5>
Group administrator
Tue 05 Nov 2013 12:29:30 PM UTC, original submission:  

This may be related to bug 39874.

Doing


graphics_toolkit fltk
subplot('position', [0.100   0.525   0.800   0.375]);
subplot('position', [0.100   0.100   0.800   0.375]);


one gets just one plot. In ML as well as with gnuplot there are two.

Muhali <muhali>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29544:  subplot3.jpg added by godfrey (10KiB - image/jpeg)
file #29545:  subplot4.jpg added by godfrey (5KiB - image/jpeg)
file #29543:  subplot2.jpg added by godfrey (10KiB - image/jpeg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by godfrey (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by muhali (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-06 rik5 StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2013-11-06 godfrey Attached File- Added subplot3.jpg, #29544
        Attached File- Added subplot4.jpg, #29545
    2013-11-05 godfrey Attached File- Added subplot2.jpg, #29543
    2013-11-05 rik5 StatusNone In Progress
        Assigned toNone rik5

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code