Path: news.mathworks.com!not-for-mail
From: "Richard Quist" <r_nospam_quist@nospam_mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Printing high quality jpegs in batch mode
Date: Thu, 3 May 2007 06:16:31 -0400
Organization: The MathWorks, Inc.
Lines: 53
Message-ID: <f1ccpv$6bc$1@fred.mathworks.com>
References: <ef55a78.-1@webcrossing.raydaftYaTP>
Reply-To: "Richard Quist" <r_nospam_quist@nospam_mathworks.com>
NNTP-Posting-Host: quistr.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1178187391 6508 144.212.107.47 (3 May 2007 10:16:31 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 3 May 2007 10:16:31 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
Xref: news.mathworks.com comp.soft-sys.matlab:406663




"p. west" <pwest@dbresearch.NOSPAM.net> wrote in message 
news:ef55a78.-1@webcrossing.raydaftYaTP...
>I want to run MATLAB processing at night in batch mode on a SUN.
> Some of the output needs to be high quality jpegs that can be
> inserted into PowerPoint but I am having trouble using the -djpeg99
> option. To try to understand this problem I wrote a plottest.m to
> just produce a couple of figures. One with the default quality and
> one with a quality of 99.
>
> plottest.m is:
>  create a figure
>  print(gcf,'-djpeg','TestPlotDefault');
>  create another figure
>  print(gcf,'-djpeg99','TestPlot99');
>
> As long as I run matlab with the following and don't interfere with
> the figures plotting to the screen, the TestPlot99 produces a good
> looking result.
>  >>matlab -nojvm -nosplash -r plottest
>
> But this ONLY works if I allow the figures to print to the screen.
> In other words batching this at night when I am logged off produces
> nothing.
>
> If I try to batch this at night with the -nodisplay option, I get the
> TestPlotDefault file (The one using -djpeg) but an error is occurs on
> the -djpeg99 option. Specifically,
>
>  at $MyTime << EoF
>  matlab -nojvm -nodisplay -nosplash -r plottest
>  Eof
>
> produces the error:
>
>  Error using => print
>  Error using ==? graphics/private/ghostscript
>  Problem calling GhostScript System returned error
>
> Does anyone see a way around this??? I am wondering if there is
> something I can do to the DISPLAY env to get this to work.
>
> Any advice is appreciated.

This was fixed in R2007a
http://www.mathworks.com/support/bugreports/details.html?rp=300027


-- 
Richard Quist
Software Developer            The MathWorks, Inc.