Problem with axis limits/range when using griddata



Hi,

I'm trying to plot a 3D graph using griddata but don't know
how to specify the scale/range of the axis.

Here's what I'm doing:

1. First I want to define the x and y axes. Note that both
axes should have a range from 0 to 100

[XI,YI] = meshgrid(0:0.1:100,0:0.1:100);

2. x_posns: These are the x-coordinate values and the
values range from 0 to 100, e.g. x = [70.2 0.6 8.9....].
There are a total of 100 x-coordinate values.

3. y_posns: These are the y-coordinate values and the
values range from 0 to 100, e.g. x = [46.2 19.6 39.9....].
There are a total of 100 y-coordinate values.

4. z_values: These are the z values that correspond to
certain x-y coordinates, e.g. coordinate (70.2, 46.2) might
have a z value of 1040.9 and so on.

5. Then I want interpolate the values between the values
I've specified using x_posns, y_posns and z. So I use
griddata as follows:

ZI = griddata(x_posns,y_posns,z,XI,YI,'cubic');

6. Now I want to have a 3D plot of ZI. So I do: mesh(ZI)

PROBLEM:
========
The graph that is plotted has the x-axis starting at 0 and
ending at 1000. But I need it to be from 0 to 100 in
increments of 0.1. The same problem goes for the y axis.
Note that I don't want to *cut off* the part from 100 to
1000. Instead I want the entire range from 0 to 1000 to be
0 to 100 instead.

Any solutions anyone?

Thanks!
Sam
.



Relevant Pages

  • Re: Automatic swap of x - and y - axis
    ... that would keep the chart in its intended configuration. ... Jon Peltier, Microsoft Excel MVP ... The graph changes not when data are entered, ... Are the values that were plotted on the horizontal axis now plotted ...
    (microsoft.public.excel.charting)
  • Re: Automatic swap of x - and y - axis
    ... of the chart, and a description of the problem, someone may be able to help. ... Jon Peltier, Microsoft Excel MVP ... by the time the graph is ... Are the values that were plotted on the horizontal axis now ...
    (microsoft.public.excel.charting)
  • Re: Automatic swap of x - and y - axis
    ... that would keep the chart in its intended configuration. ... Jon Peltier, Microsoft Excel MVP ... The graph changes not when data are entered, ... Are the values that were plotted on the horizontal axis now plotted ...
    (microsoft.public.excel.charting)
  • Re: Chart wizard funcitonality in Excel 2007?
    ... myself making the same bar graph with a secondary axis line graph. ... give us the 03 chart wizard as a downloadable add in. ... I've been using Excel for ...
    (microsoft.public.excel.charting)
  • Re: Graphing points to the 10^-19
    ... Jon Peltier, Microsoft Excel MVP ... When editing the y axis the minimum value on automatic is 0 and the ...
    (microsoft.public.excel.charting)