[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wierd plotting question
From: |
Henry F. Mollet |
Subject: |
Re: Wierd plotting question |
Date: |
Sat, 05 Mar 2005 10:47:18 -0800 |
User-agent: |
Microsoft-Entourage/10.1.1.2418 |
If you don't have the epstk toolkit, you can use scatter if the color is
specified by a third variable. Plus you can use another variable for size.
Henry
octave:1> help scatter
scatter is the user-defined function from the file
/Users/mollet/Desktop/usr/local/share/octave/2.1.55/site/m/octave-forge/stat
istics/scatter.m
SCATTER Scatter plot.
SCATTER(X,Y,S,C) displays colored circles at the locations specified
by the vectors X and Y (which must be the same size). The area of
each marker is determined by the values in the vector S (surface area)
and the colors of each marker are based on the values in C. S can be a
scalar, in which case all the markers are drawn the same size, or a
vector the same length as X and Y.
When C is a vector the same length as X and Y, the values in C
are used as the color of each circle.
RGB color not supported
usage: scatter (...)
scatter(X,Y) draws the markers in the default color.
scatter(X,Y,S) draws the markers with size S.
scatter(X,Y,S,C) draws the markers with size S and color C.
scatter(...,M) uses the marker M instead of default one.
scatter(...,"filled") fills the markers, this feature isn't supported.
Use PLOT for single color, single marker size scatter plots.
Example: A=[0:0.5:2*pi];
B=[0:0.2:2.4]; B(1,4)=5; B(1,8)=-5;
C=[0:1:6, 0:1:5];
scatter (A,B,abs(B*0.2),C,"@","filled");
> Hi,
> Do you really mean the color be a function of x? ie the value of x
> should be defined both by the position left-to-right on the plot
> and by the hue ? Or you intend the colour to represent an
> additional independent variable ?
> In the second case, look at the epstk toolkit by Stefan Mueller.
> His eplot function has provision for defining the color of each
> function plotted in terms of RGB values.
> Cheers, Avraham
>
>
on 3/5/05 12:54 AM, address@hidden at address@hidden wrote:
> On Sat, Mar 05, 2005 at 12:21:13AM -0500, Madhusudan Singh wrote:
>> Hi,
>>
>> I have a strange question regarding plotting in octave. Suppose, I want to
>> plot y vs x, but I want the color of the plot to be a user specified function
>> (on rgb space) of x. Is this kind of thing possible ?
>>
>> Thanks.
>>
>>
>>
>> -------------------------------------------------------------
>> Octave is freely available under the terms of the GNU GPL.
>>
>> Octave's home on the web: http://www.octave.org
>> How to fund new projects: http://www.octave.org/funding.html
>> Subscription information: http://www.octave.org/archive.html
>> -------------------------------------------------------------
>>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------