help-octave
[Top][All Lists]
Advanced

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

Re: patch with interpolated color


From: Martin Helm
Subject: Re: patch with interpolated color
Date: Tue, 1 Jun 2010 23:33:56 +0200
User-agent: KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; )

Am Dienstag, 1. Juni 2010 23:17:32 schrieb RodgerWu:
> Hi,
> 
> I am new to Octave and have been using Matlab for a long time.
> 
> In matlab I am able to use 'patch' to plot a polygon of any shape filled
> with color interpolated based on colors specified for each vertex.
> 
> I just found that 'patch' in Octave is great for uniform color and doesn't
> support color interpolation at all. Is this true?
> 
> for example, how do I plot a triangle with vertexes at  [0 0; 1 0; 1 1] and
> colors at each corner represented by 0, 1, 2 respectively?
> 
> Thanks for the helps!
> 
> Rodger
> 
With the Gnuplot backend you will not be able to do that, if you switch to 
fltk it is possible (depends which version of octave you are using).

backend("fltk")
patch("Faces", [1 2 3], "Vertices", [0 0; 1 0; 1 1], ...
"FaceVertexCData", [0; 1; 2])
shading interp

- mh


reply via email to

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