[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do you change to an ordinate on gsplot?
From: |
Henry F. Mollet |
Subject: |
Re: How do you change to an ordinate on gsplot? |
Date: |
Sun, 24 Apr 2005 10:57:01 -0700 |
User-agent: |
Microsoft-Entourage/10.1.1.2418 |
Not quite sure if I'm answering your question but gsplot z will use a
counter for x and y starting at 0 (has a name but I cannot think of it right
now)
*whereas* mesh (x,y,z') will use x and y as given. Note that one has to use
z' to get the same plot. [That is a right-handed coordinate system according
to z = cross-product of x and y (turning x-axis (vector) counter-clockwise
towards y-axis (vector) produces z-axis (vector) pointing up].
Octave input follows and 2 graphs are attached for demonstration.
Henry
octave:13> x=[1:1:5]
x =
1 2 3 4 5
octave:14> y =[2:2:10]
y =
2 4 6 8 10
octave:15> [xx,yy]=meshgrid(x,y)
xx =
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
yy =
2 2 2 2 2
4 4 4 4 4
6 6 6 6 6
8 8 8 8 8
10 10 10 10 10
octave:16> z = xx.^2+yy.^2
z =
5 8 13 20 29
17 20 25 32 41
37 40 45 52 61
65 68 73 80 89
101 104 109 116 125
octave:18> gset term aqua 1
octave:19> gsplot z % saved as Fig1_gsplot
octave:21> gset term aqua 2
octave:22> mesh (x,y,z') % savedd as Fig2_mesh
on 4/24/05 6:54 AM, Robert A. Macy at address@hidden wrote:
> How do you change to an ordinate "scale" in gsplot?
> I'm not mathematical, so I may be using the wrong terms,
> but what I mean is:
> Given a two dimensional array of real values,
> the line...
>
>>> gsplot values;
>
> ...something automatically makes a great 2d mesh plot
> with x = rowsofvalues and y = columnsofvalues
> and z = values
>
> I want y to be transformed to a different "scale".
>
> I have specific values for the scale. The values are not
> uniform. so the mesh display has "sawtooth" like artifacts.
> How do I change the y to be a function of indices?
>
> Stated another way.
>
> How do I 2d mesh plot an array with x = index of rows
> and y = monotonic function ( index of columns ) ??
>
> - Robert -
>
>
>
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
>
Fig1_gsplot.pdf
Description: Binary data
Fig2_mesh.pdf
Description: Binary data