Re: Can You Change Domain in ListContourPlot?
- To: mathgroup@smc.vnet.net
- Subject: [mg11581] Re: Can You Change Domain in ListContourPlot?
- From: Paul Abbott <paul@physics.uwa.edu.au>
- Date: Tue, 17 Mar 1998 10:43:02 -0500
- Organization: University of Western Australia
- References: <6ec2q3$4bu@smc.vnet.net>
Chris Farr wrote: > 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. You can use MeshRange (an option for ListPlot3D, SurfaceGraphics, ListContourPlot, ListDensityPlot and related functions which specifies the range of x and y coordinates that correspond to the array of z values given.). > 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. But, surely, doing a ListContourPlot must also introduce some imprecision? Since you have discrete data, how do you think ListContourPlot can produce "exact" contour lines? I think your solution using Interpolation will do as well. You can play with the InterpolationOrder option if your data is sufficiently smooth. Cheers, Paul ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul@physics.uwa.edu.au AUSTRALIA http://www.pd.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________