help-octave
[Top][All Lists]
Advanced

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

Re: How do you change to an ordinate on gsplot?


From: Robert A. Macy
Subject: Re: How do you change to an ordinate on gsplot?
Date: Sun, 24 Apr 2005 18:12:18 -0700

Henry,

SORRY!

I inadvertantly called the array that I'm trying to plot as

"values"   

Seems there are too many built in functions that are
similar to what I'd call a variable.  
For example, max and min

If matLab had used all caps for built in functions, I
wouldn't be tripping over this.  

That said, I think you answered my question VERY well.  

I needed to do what gsplot does but control one of the
ordinates to be different.  And yes, it is VERY slow, so it
is unuseable for me.  

             - Robert -

On Sun, 24 Apr 2005 16:04:42 -0700
 "Henry F. Mollet" <address@hidden> wrote:
> Robert (offlist)
> As per below my values function takes only one argument
> and I don't have an
> ordinate function. 
> 
> As I said I'm not entirely sure what your question
> actually was and what
> you're trying  to plot.
> 
> Usually plotting a grid can take forever and contour
> would be much faster
> but again I'm not sure if it would help.
> Henry
> 
> 
> 
> octave:32> help values
> values is the user-defined function from the file
> /sw/share/octave/2.1.46/m/statistics/base/values.m
> 
>  - Function File:  values (X)
>      Return the different values in a column vector,
> arranged in
>      ascending order.
> 
> octave:33> help ordinate
> 
> help: sorry, `ordinate' is not documented
> 
> Additional help for built-in functions, operators, and
> variables
> is available in the on-line version of the manual.  Use
> the command
> `help -i <topic>' to search the manual index.
> 
> Help and information about Octave is also available on
> the WWW
> at http://www.octave.org and via the
> address@hidden
> mailing list.
> octave:34> 
> 
> 
> 
> 
> 
> on 4/24/05 3:30 PM, Robert A. Macy at address@hidden
> wrote:
> 
> > Henry,
> > 
> > Thank you for your prompt reply.  I didn't know about
> this
> > "mesh" function.  I was used to using...
> > 
> >>> gsplot values(1:400,1:70);
> > 
> > to do your idea, I tried "long hand" by using...
> > 
> >>> x=[(1:400)']*ones(1,70);
> >>> xx=vec(x);
> >>> y=ordinate(1:70);
> >>> yy=vec(y);
> >>> zz=vec(values);
> >>> mesh(xx,yy,zz);
> > 
> > However, I did discover that it could all be
> simplified,
> > using small vectors for x, y, and leave z as an array.
> > Doing the simplified manner I did have to transpose z.
> > 
> > Yes, it plots.  Yes, it does what I want BUT...
> > 
> > It took over two minutes to plot.  And moving around,
> > forget it!  Also, turned my plots green [difficult to
> see]
> > 
> > I tried clipping what I display down to 50:70, but
> still
> > waaaaay too slow, like 10 seconds each move.
> > 
> > I'm running 
> > octave 2.1.50a-inst.exe on a 733MHz Win98 machine.
> > 
> > Guess I'll have to write a program to uniformly
> distribute
> > the values over index values and live with it, eh?
> > 
> >               - Robert -
> > 
> > On Sun, 24 Apr 2005 10:57:01 -0700
> > "Henry F. Mollet" <address@hidden> wrote:
> >> 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
> >>> 
> >> 
> >
>
-------------------------------------------------------------
> >>> 
> >> 
> > 
> > 
> > 
> >
>
-------------------------------------------------------------
> > 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
-------------------------------------------------------------



reply via email to

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