Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to draw an irregular shape on GUI axes?
Date: Thu, 2 Aug 2007 20:27:24 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 25
Message-ID: <f8tenc$hke$1@canopus.cc.umanitoba.ca>
References: <f8td95$i7t$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1186086444 18062 192.70.172.160 (2 Aug 2007 20:27:24 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Thu, 2 Aug 2007 20:27:24 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:422240


In article <f8td95$i7t$1@fred.mathworks.com>,
Kathleen  <quisquiliae2@hotmail.com> wrote:
>Hi! I am creating a GUI (using Matlab and GUIDE), and I 
>would like to draw a static, irregularly-shaped object on 
>my axes. From all of the Matlab documentation I've seen, 
>it is only possible to plot rectangles and ovals, but 
>nothing else. 

>Is my only option to overlay a large series of rectangles 
>& ovals to create my desired shape (if this is even 
>possible), or does someone know of a way to create a 
>static irregular shape easily?

If it is static, you could possibly draw it into an image
and display the image.

If it is a filled polygon, you can use fill().

You can use plot() to create line plots; if you issued
a 'hold on' command, then the next plot would add to the
existing plot rather than erasing.

If it is a filled polygon, you can use patch()
-- 
Programming is what happens while you're busy making other plans.