help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [unclassified] Re: patch: Invalid call to __patch__


From: kahacjde
Subject: Re: [unclassified] Re: patch: Invalid call to __patch__
Date: Tue, 25 Sep 2007 06:47:42 -0700 (PDT)


[cut]
> The following patch should allow string values for 'FaceColor' for patch
> objects.
> 
> patch(rand(1,4),rand(1,4),"r")
> should plot a red patch object.
> 
> Kai
> 
> 2007-09-24  Kai Habel  <address@hidden>
> 
>    * plot/__patch__.m : Allow color string for patch

Hi Kai,

I think this is wrong, this way. Firstly isstr is deprecated and
replaced with ischar, and secondly this change would be confused by for
example

patch (rand(4,1), rand(4,1), "FaceColor", "red")

that currently works.. However, it is cleaner than what I suggested, and
easily fixed with the attached..

I also noticed a couple of issues.. The color_properties should allow
upper and lower case values, and that setting the facecolor of a patch
to "interp" or "flat" is broken. That is

set (h, "facecolor", "interp")

will fail. The attached version of the patch addresses that as well..

[patch deleted]

Hello David,

I have just checked with an older matlab version (7.0.4) your 1st example is
not a valid call of patch. In the 2D case patch requires 3 arguments
(x,y,c). Optionally you can add 'PropertyName','PropertyValue pairs to
patch. So for example:

patch(rand(4,1),rand(4,1),'blue','FaceColor','red')

is valid and plots a blue patch but 

patch(rand(4,1),rand(4,1),'FaceColor','red')

is not. Thanks for spotting and fixing the other problems.

Kai 
-- 
View this message in context: 
http://www.nabble.com/patch%3A-Invalid-call-to-__patch__-tf4508065.html#a12880000
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]