bam_usic has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to run a programme which is using PGPLOT.When I call it from browser I get following error message. -------- %PGPLOT, Unable to read font file: grfont.dat %PGPLOT, Use environment variable PGPLOT_FONT to specify the location of the PGPLOT grfont.dat file. %PGPLOT, PGENV: no graphics device has been selected %PGPLOT, PGBBUF: no graphics device has been selected %PGPLOT, PGMTXT: no graphics device has been selected %PGPLOT, PGMTXT: no graphics device has been selected %PGPLOT, PGMTXT: no graphics device has been selected %PGPLOT, PGEBUF: no graphics device has been selected ---------- grfont.dat file is on on my system under c:\XAMPP\perl\lib and I have set it as enviorment variable PGPLOT_FONT. I even added $ENV{PGPLOT_FONT} ||= 'c:\XAMPP\perl\lib\grfont.dat'; to my script. But still it gives same error. But if I run it from command line.There is no error. Any help will be much appreciated. Thanks,
  • Comment on I am trying to run a programme which is using PGPLOT.When I call it from browser I get following error message.

Replies are listed 'Best First'.
Re: I am trying to run a programme which is using PGPLOT.When I call it from browser I get following error message.
by Anonymous Monk on Apr 18, 2010 at 13:17 UTC
    But if I run it from command line.There is no error.

    Compare the enviroments and permissions, and figure out what is different.

Re: I am trying to run a programme which is using PGPLOT.When I call it from browser I get following error message.
by Anonymous Monk on Apr 18, 2010 at 13:53 UTC
    Try putting the $ENV{PGPLOT_FONT} ||= 'c:\XAMPP\perl\lib\grfont.dat' in a BEGIN BLOCK before the use PGPLOT statement.
    BEGIN {$ENV{PGPLOT_FONT} ||= 'c:\XAMPP\perl\lib\grfont.dat'}; use PGPLOT;