Print not creating output file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Print not creating output file

Jeffrey
I'm trying to create graphs in a .pdf file, but no files are being created. This, or similar, code used to work. Here's my code now:

clear; clc; more off;
T=100000; p=5;
tic; initFPU_2D; toc;

src   = '/raid/fpuData/';
tgt   = '/raid/fpuData/graphs/';
ftype = '.U.csv';
tmplt='N=%04dx%04d_Beta=%05.2f_tol=1e-08_t=0000';

highFreq = 150;
betas = 1:1;
for beta = betas
  fn=sprintf(tmplt, N, N, beta);
  fprintf('Loading %s:\t', fn);
  tic; u1 = csvread([src fn ftype]); toc;
  [W, W, W, Wdot] = xformFPU(u1, F);
  H(:,:,beta) = energyPerFourierMode(D, W, Wdot);
end

close all;
fprintf('Plotting...\n');
for beta=betas

  fn=sprintf(tmplt, N, beta);

  h=figure; clf; hold on;
  col=1;
  plot(H(:,col,beta),'b-');
  if N/2 >= 4,  plot(H(:,col+2,beta),'r-'); end
  if N/2 >= 6,  plot(H(:,col+4,beta),'g-'); end
  if N/2 >= 8,  plot(H(:,col+6,beta),'k-'); end
  if N/2 >= 10, plot(H(:,col+8,beta),'k-'); end

  axis tight;
  strTitle = 'Energy per Mode (N=%dx%d, Beta=%.d)';
  strTitle = sprintf(strTitle, N, N, beta);
  title(strTitle,'FontSize',12);
  xlabel('Time');
  ylabel('Energy');
  hold off;

  print(h, [tgt fn '_Energy_per_Mode.pdf'], '-dpdf');
end

I'm getting the following messages

Loading N=0032x0032_Beta=01.00_tol=1e-08_t=0000:        Elapsed time is 331.62 seconds.
warning: X11 DISPLAY environment variable not set
Plotting...
warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: print.m: fig2dev binary is not available.
Some output formats are not available.
warning: print.m: pstoedit binary is not available.
Some output formats are not available.
Reply | Threaded
Open this post in threaded view
|

Re: Print not creating output file

bpabbott
Administrator
On Oct 13, 2013, at 5:11 PM, Jeffrey wrote:

> I'm trying to create graphs in a .pdf file, but no files are being created.
> This, or similar, code used to work. Here's my code now:
>
> <snip> ... </snip>
>
> I'm getting the following messages

>

> Loading N=0032x0032_Beta=01.00_tol=1e-08_t=0000:        Elapsed time is 331.62 seconds.
> warning: X11 DISPLAY environment variable not set
> Plotting...
> warning: print.m: epstool binary is not available.
> Some output formats are not available.
> warning: print.m: fig2dev binary is not available.
> Some output formats are not available.
> warning: print.m: pstoedit binary is not available.
> Some output formats are not available.

I'll assume you are running Octave on Windows?  You'll need to install Ghostscript.

http://wiki.octave.org/Octave_for_Windows#Printing_.28installing_Ghostscript.29

Ben

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave