Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!novia!news1.optus.net.au!optus!news.optus.net.au!53ab2750!not-for-mail
From: Ross <ross@nospam.com>
Subject: problems printing to file
Newsgroups: comp.soft-sys.matlab
X-Original-NNTP-Posting-Host: 202.61.162.14
Message-ID: <49e1f8e8@news.mel.dft.com.au>
X-Original-Trace: 13 Apr 2009 00:21:28 +1100, 202.61.162.14
Lines: 36
Date: Sun, 12 Apr 2009 14:21:30 GMT
NNTP-Posting-Host: 203.123.72.37
X-Complaints-To: luke.johnson@team.eftel.com
X-Trace: news.optus.net.au 1239546090 203.123.72.37 (Mon, 13 Apr 2009 00:21:30 EST)
NNTP-Posting-Date: Mon, 13 Apr 2009 00:21:30 EST
Organization: EfTel - reports relating to abuse should be sent to luke.johnson@team.eftel.com
Xref: news.mathworks.com comp.soft-sys.matlab:532144


Dear folks

What I want to do is very straighforward - to transfer the plotted screen 
figures exactly as they appear on the screen to graphics files with the same 
pixel dimensions and the same colour depth as the screen figure, under program 
control.  Lossless compression is desirable, but not obligatory.

In R2008b,  using the PRINT command, the -dbitmap driver is the only one that 
creates the correct sized file image, but it is not acceptable for shaded 
figures because it cuts the colour depth from 24bit to 8bit.
The -dbmp, -dpng and -dtiff drivers retain 24bit colour but are completely 
useless because they save only a fraction of the screen figure (a rectangle 
based on the lower lefthand corner), and the size of this portion is not 
altered by any of the dpi settings.
Fiddling with all the options that are allowable in the PRINT command doesn't 
seem to fix any of these problems.

Interactive saving to file via the Figure menu bar DOES work.  Furthermore, if 
I change the File / Export Setup / Rendering / Resolution setting from 'auto' 
to 'screen', then further exporting of the same figure in m-code (PRINT 
command) now works correctly.  It continues to work correctly even if the 
setting is changed back to 'auto' !  However this is specific to each figure, 
and means that prior manual intervention is necessary for every figure.  I 
couldn't find any option for the PRINT command or in the various startup files 
that has the same effect.  The '-r0' option certainly doesn't.

My programs usually generate multiple plots, from 5 to 30 at a time, so I need 
the figures to be saved under program control.  I don't see everyone else 
complaining about this:  so if it's something I'm doing wrong,  what the hell 
is it?
Is there a command which can be used in m-files which has the same effect as 
setting Resolution to 'screen' in the Export Setup?

Thanks
Ross