help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: John W. Eaton
Date: Thu, 14 Jun 2007 12:58:27 -0400

On 14-Jun-2007, A. Scottedward Hodel wrote:

| I've recently updated some of my work code to use octave 2.9.12.  I'm  
| generating several carpet plots with hundreds of lines in them.  With  
| earlier versions of octave, I set automatic_replot to 0 until I  
| executed the very last plot command because the carpet plots executed  
| so slowly.  Now that automatic_replot is gone, it takes about 10  
| minutes per plot, which means that the plots are taking longer than  
| the original Monte-Carlo runs!
| 
| Is there a way to avoid this undesirable behavior in octave/gnuplot  
| with the most recent plotting commands?

Something like this should work:

  figure (1, 'visible', 'off');
  ... plotting commands ...
  set (gcf, 'visible', 'on');

| Mt plotting code is below.  Some of the remnants of older plotting  
| commands are still there.
| 
|      plot(tplot,thisvar,'-');
|      __gnuplot_set__ size noratio   % normal plotting
|      for ii=1:nSets
|        text(ttext,thisvar(t4,ii),sprintf("%d",ii));
|      endfor
|      grid on
|      __gnuplot_set__ nokey
|      xlabel("time (s)");
|      ylabel(carpetPlotNames{sn,2});
|      title(sprintf('%s Carpet plot: %d runs',dispersionDir, nSets));
|      eval(sprintf('print -depsc %s/carpetPlot%. 
| 2d.eps',dispersionDir,sn));
|      eval(sprintf('print -dpng %s/carpetPlot%. 
| 2d.png',dispersionDir,sn));

As you probably already noticed, the __gnuplot_set__ commands no
longer have any effect on the plots generated with the higher level
plotting commands.  They interact with completely separate plot
streams now.

Also, you don't need eval here.  You can use

  print ("-dpng", sprintf ("%s/carpetPlot%.2d.png', dispersionDir, sn));

instead.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]