Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!newsfeed.stanford.edu!postnews.google.com!c58g2000hsc.googlegroups.com!not-for-mail
From: Nomee <farrukhsubhani@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Transform a plot into an image
Date: Thu, 15 May 2008 15:32:50 -0700 (PDT)
Organization: http://groups.google.com
Lines: 18
Message-ID: <e1715931-0519-4227-a8c6-26a9e19c0bb2@c58g2000hsc.googlegroups.com>
References: <33278300.1210889040237.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: 79.66.6.107
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1210890770 29610 127.0.0.1 (15 May 2008 22:32:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 15 May 2008 22:32:50 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: c58g2000hsc.googlegroups.com; posting-host=79.66.6.107; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9b5) 
Xref: news.mathworks.com comp.soft-sys.matlab:468727


From Matlab Help
A = getimage(h) returns the first image data contained in the Handle
Graphics object h. h can be a figure, axes, or image. A is identical
to the image CData; it contains the same values and is of the same
class (uint8, uint16, double, or logical) as the image CData. If h is
not an image or does not contain an image, A is empty.

You might be getting A = [] which obviously means an empty matrix.

Try this
d=getimage(gcf)
This will atleast give you handle of current figure (if it has not
been closed).

You may be able to get axis handle by defining an axis before you plot
and then capture that axis. You have not mentioned if you want axis of
figure so I hope gcf will do it for now.