Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!p25g2000hsf.googlegroups.com!not-for-mail
From: Mars creature <jinbow@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Saving a overlay and image figure
Date: Sun, 7 Sep 2008 17:53:23 -0700 (PDT)
Organization: http://groups.google.com
Lines: 25
Message-ID: <5c654054-d26c-4cf3-9865-171a56e230ad@p25g2000hsf.googlegroups.com>
References: <ga1fvr$4em$1@fred.mathworks.com>
NNTP-Posting-Host: 18.83.6.116
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1220835203 3050 127.0.0.1 (8 Sep 2008 00:53:23 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 8 Sep 2008 00:53:23 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p25g2000hsf.googlegroups.com; posting-host=18.83.6.116; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.14) 
Xref: news.mathworks.com comp.soft-sys.matlab:489080



On Sep 7, 5:10 pm, "Nicholas Beser" <nick.be...@jhuapl.edu> wrote:
> I was able to create a very large image with a line overlay in MATLAB 2008a. I tried to use getimage to retrieve the combination of image and line overlay, however the function only returned the image (no line art).
>
> Here is the code fragment:
> h=imshow(imgtest,'XData',XData,'YData',YData);title(frmstr1);
> hold on
> for k=2:frmcnt
>     xl=[pointlist(1,k-1) pointlist(1,k)];
>     yl=[pointlist(2,k-1) pointlist(2,k)];
>     plot(xl,yl,'Color','b');
> end
> Anewimg=getimage(h);
> hold off
>
> Is there some other function that I should use to save the entire figure to a graphics file (such as PNG or JPG)? While I can manually save the figure as a jpg, it is not saved at the full resolution, only at display resolution. Since the display is at 17%, that is not sufficient.
>
> Thank-you,
>
> Nick Beser
> nick.be...@jhuapl.edu

Not sure if it works for you.
You can use 'print' to save the figure to a graphic file, such as
jpg,eps etc. 300dpi (-r300) should be enough to have a nice printout.
Jinbo