MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Can You Change Domain in ListContourPlot?




Consider the following 2-D matrix.

{ {6.4,1.9},{5.25,15.6} }.

When I do a ListContourPlot, the domain on the horizontal axis goes from
 1 to 2.  On the vertical axis, the domain also ranges from 1 to 2.  
Thus, mathematica assumes the domain is juts the values' position in
the  matrix.

What if the above is not really the domain?  For example, let's say that
 (X=149, Y=15) yielded a value of 6.4.  Mathematica thinks that 
(X=1,Y=1) yielded this value.

It seems that ListContourPlot only accepts a matrix of values, not the 
domain.  I tried to put in the below:

ListContourPlot[{ {149,15,6.4},etc..}], but to no avail.

So, that's my question, but I would like to avoid the following solution
 to this problem, however:

Create an interpolating object via ListInterpolation which transforms 
the domain from the "position in the matrix" domain to the actual 
domain.  The command is the following:

ListInterpolation[matrix values,{xdomain,ydomain}]

Then, one could do a ContourPlot (not a ListContourPlot as it is now a 
continuous thing) on the interpolating object.

This works, but my ultimate goal is to extract contour lines.  The 
interpolating business causes some imprecision I would like to avoid.

Thanks in advance,

Chris Farr




  • Prev by Date: Re: Problems with Display function
  • Next by Date: Problems ....
  • Prev by thread: Re: TELLING PROGRAM THAT A VARIABLE IS AN INTEGER
  • Next by thread: Re: Can You Change Domain in ListContourPlot?