bugGNU Octave - Bugs: bug #42194, No output from saveas() command

 
 

bug #42194: No output from saveas() command

Submitter:  None
Submitted:  Fri 25 Apr 2014 08:59:26 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  David Blackman Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.1
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 25 Sep 2014 01:59:43 AM UTC, comment #3: 

No response to requests for more information for several months, closing report since there is nothing reproducible or actionable.

Mike Miller <mtmiller>
Group Member
Fri 25 Apr 2014 09:47:05 PM UTC, comment #2: 

For reference, the "can't print non-visible figures" bug is bug #33180.

For the other issue reported, the example posted is not complete, it depends on data files that are not attached to this bug report. Can you either confirm Pantxo's suggestion that the plot prints correctly if you give it some time to finish, or attach a complete example that we can run to reproduce what you're seeing?

Mike Miller <mtmiller>
Group Member
Fri 25 Apr 2014 03:42:34 PM UTC, comment #1: 

The difference between octave 3.6.4 and 3.8.1 is that "fltk" is now the default graphics toolkit. It is a known issue that with fltk the figure must be visible in order to be printed.

Can you try "close all; graphics_toolkit gnuplot" before running your function?

Now about the scrambled/non responsive window (with fltk again), I can confirm that behavior but it lasts only the time to print the figure to file (no more than a few seconds for a reasonably complicated figure). Maybe your figure has very many points and the time to print it is long. Can you decimate your data before printing and see if it improves the printing time?

Pantxo Diribarne <pantxo>
Group Member
Fri 25 Apr 2014 08:59:26 AM UTC, original submission:  

Hi, I've tried a number of different commands to save a plot, this script worked in the previous version I had installed (3.6.4) but not longer works in the newer 3.8.1 version.
I simply get no output at all, no file and no error displayed. Also when the graph plot window is set to "visible" the window suffers graphically glitches and won't respond to clicks or any input.

function dostuff()
  i = 0;
  col = ["r","g","b","k","5","6","y"];
  mass = 20*(1.66e-27);
  var2 = load("Velpertd.txt");
  j=figure(1)#,"visible","off");
  plot(var2(:,1)+27,var2(:,3)/1e6,"-m","linewidth",3);
  hold;
  x = 1;
  for  i = 2:1:8;
    filname = strcat(num2str(i),"pi__10.dat");
    var = load(filname);
    type = strcat("-",col(x));
    plot(var(:,1)*1e6,(var(:,2)/mass)/1e6,type,"linewidth",3);
    x=x+1;
  endfor

  xlabel("x position in microns");
  ylabel("Velocity (10^{6}ms^{-1})");
  tit = strcat("Ion velocity perturbation at t = 100fs for varying ionisations");
  title(tit);
  axis([25,35,0,1]);
  grid('on');
  set(gca(),'xtick',25:0.5:35);
  set(gca(),'ytick',0:0.1:1);
  h =  legend("Perturbation Used","2","3","4","5","6","7","8");
  legend location northeast;
  #outfilnam=strcat("");
  hold
  saveas(j,"AApxim100.png","png")
endfunction
dostuff()


Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31245:  100fsplot.m added by None (884B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by None (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-09-25 mtmiller Open/ClosedOpen Closed
    2014-04-25 mtmiller CategoryPlotting Plotting with OpenGL
        StatusNone Works For Me
    2014-04-25 None Attached File- Added 100fsplot.m, #31245

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code