bugGNU Octave - Bugs: bug #41895, plot content is lost with fltk...

 
 

bug #41895: plot content is lost with fltk when visible was off

Submitter:  Doug Stewart <dastew>
Submitted:  Tue 18 Mar 2014 10:47:12 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  andy1978
Originator Name:  Doug Stewart Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 02 Jan 2015 02:17:22 AM UTC, comment #17: 

@Andreas: Thanks.  The problem is resolved.  Closing report.

Rik <rik5>
Group administrator
Thu 01 Jan 2015 06:39:52 PM UTC, comment #16: 

Sorry for the delay, I forgot this one. Changeset http://hg.savannah.gnu.org/hgweb/octave/rev/728873ccd637 should fix the last problem from comment #14.

Andreas Weber <andy1978>
Group Member
Sun 03 Aug 2014 07:52:01 PM UTC, comment #15: 

@Rik: I'll have a look at it in 2-3 days. I'm preparing some other changes for the FLTK toolkit at the moment and review all FLTK related bugs.

Andreas Weber <andy1978>
Group Member
Sun 03 Aug 2014 07:06:36 PM UTC, comment #14: 

There is still something wrong with the FLTK code.

The code below doesn't show any plot:


hf = figure ();
set (hf, 'visible', 'off');
plot (1:10);
set (hf, 'visible', 'on');


The graphic objects are definitely created and you can check their properties, but FLTK is not drawing them.

Rik <rik5>
Group administrator
Thu 31 Jul 2014 09:22:49 PM UTC, comment #13: 

@Doug: I made some bigger changes to the FLTK toolkit on default the last weeks and your initial codepiece works for me now.

Could you build the current default branch (cset 19cb2530c16b) and try this again:


graphics_toolkit fltk
figure(2)
rlocus(ss1)


-- Andy

Andreas Weber <andy1978>
Group Member
Sat 22 Mar 2014 12:31:21 PM UTC, comment #12: 

I said there were 3 options

1)
figure ("visible", "off");
...
set (gcf, "visible", "on");

2)
axes
set(gcf,""visible", "off");
...
set (gcf, "visible", "on");

3)
hplt = plot (args{:});
set (gcf,"visible","off");
...
set (gcf, "visible", "on");

Only option 3 works with subplots!!
option 1) creats a new window
option 2) wipes out the subplot info and uses the whole window.

So, this still needs to be fixed.

Doug Stewart <dastew>
Fri 21 Mar 2014 11:17:46 AM UTC, comment #11: 

Thanks I was the original poster and I would like to document the results. There are 3 work arounds.

1)
figure ("visible", "off");
...
set (gcf, "visible", "on");

2)
axes
set(gcf,""visible", "off");
...
set (gcf, "visible", "on");

3)
hplt = plot (args{:});
set (gcf,"visible","off");
  ...
set (gcf, "visible", "on");

We chose 2) when we fixed rlocus but maybe 1) is better.

I think we can close this now.
At least it is documented.

Doug Stewart <dastew>
Fri 21 Mar 2014 04:40:22 AM UTC, comment #10: 

I'm pretty sure this is an FLTK problem only.  I suggest using


figure ("visible", "off");
...
set (gcf, "visible", "on");


workaround that you discovered.

I'm not sure that this will get fixed because it is pretty obscure and we would like to move to the Qt toolkit anyways.

Rik <rik5>
Group administrator
Thu 20 Mar 2014 11:34:44 PM UTC, comment #9: 

I don't know, but it is part of 3.9.x, the gui-release branch.

I just quickly tested it and I am able to plot with a non-visible figure using the Qt toolkit, so this looks like it affects the FLTK toolkit only. IOW, this is not a generic OpenGL problem, FLTK problem only.

Mike Miller <mtmiller>
Group Member
Thu 20 Mar 2014 03:50:51 PM UTC, comment #8: 

No
How to you get the qt  toolkit to work in 3.8.1?

Doug Stewart <dastew>
Thu 20 Mar 2014 02:45:14 PM UTC, comment #7: 

Bug #33180 applies to all operating systems, it is a "feature" of the GL2PS library used for printing with FLTK, only what is visible can be printed to a file.

Both deal with non-visible figures, but are not otherwise related.

By the way have you tried these plot commands with the Qt toolkit?

Mike Miller <mtmiller>
Group Member
Thu 20 Mar 2014 01:49:50 PM UTC, comment #6: 

Bug #33180 and this bug are related!!
This one is on Ubuntu and not using print
33180 is on windows and using print.

Doug Stewart <dastew>
Wed 19 Mar 2014 02:37:33 PM UTC, comment #5: 

andy reported that
this also works

figure (8, "visible", "off");
plot (1:2,3:4);
set (gcf (), "visible", "on");

Doug Stewart <dastew>
Wed 19 Mar 2014 02:25:30 PM UTC, comment #4: 

this works!!!

figure(81)
axes
set (gcf,"visible","off");
plot (1:5,3:7);
set (gcf (), "visible", "on")


thanks to Andy for this tip

Now we should find out why this is needed for fltk and not for gnuplot

Doug Stewart <dastew>
Tue 18 Mar 2014 06:35:49 PM UTC, comment #3: 

The title should be changed. This problem is not with rlocus but it is a problem with fltk and the set commads as was shown in my last message.
 The set commands work ok with gnuplot but not with fltk!!

Doug Stewart <dastew>
Tue 18 Mar 2014 05:59:41 PM UTC, comment #2: 

graphics_toolkit fltk

this does not work
clf
 figure(8)
  set (gcf,"visible","off");
   plot (1:5,3:7);
  set (gcf (), "visible", "on");

this works!!
clf
 figure(8)
 
   plot (1:5,3:7);
 
Any ideas???

Doug Stewart <dastew>
Tue 18 Mar 2014 03:41:28 PM UTC, comment #1: 

'rlocus' isn't in core Octave, but rather in the control package.  I've changed the category to Octave Forge Package.  I guess you should take a look at the rlocus.m file and see if they are doing something funny with the graphics_toolkit command.

Rik <rik5>
Group administrator
Tue 18 Mar 2014 10:47:12 AM UTC, original submission:  

the following code does not draw a graph in figure 2

graphics_toolkit gnuplot
figure(1)
ss1=tf([ 3 7 2],[1 22 4 7 1])
rlocus(ss1)


graphics_toolkit fltk
figure(2)
rlocus(ss1)


but if I then do
step(ss1)
a graph is drawn in figure 2
so only the rlocus does not draw a graph!!!!
 

I have Ubuntu 12.04 and octave 3.8.1

Doug Stewart <dastew>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by andy1978 (Updated the item)
  • -email is unavailable- added by paramaniac
  • -email is unavailable- added by dastew (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 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-02 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2015-01-01 andy1978 StatusConfirmed Ready For Test
        Assigned toNone andy1978
    2014-03-21 rik5 Item GroupRegression Incorrect Result
    2014-03-20 andy1978 CategoryOctave Package Plotting with OpenGL
        StatusNone Confirmed
        Summaryrlocus does not draw using fltk plot content is lost with fltk when visible was off
    2014-03-18 rik5 Carbon-CopyRemoved 72865 -
    2014-03-18 rik5 CategoryPlotting Octave Package
    2014-03-18 paramaniac Carbon-Copy- Added paramaniac

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code