[Date Index]
[Thread Index]
[Author Index]
Re: Re: Mapping Data
*To*: mathgroup at smc.vnet.net
*Subject*: [mg57341] Re: [mg57321] Re: Mapping Data
*From*: "David Park" <djmp at earthlink.net>
*Date*: Wed, 25 May 2005 06:02:46 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
You can obtain a nice circular contour plot, without warning messages by
using...
T = Table[Exp[-x], {x, 0, 1, 0.1}];
R = Table[x, {x, 0, 1, 0.1}];
fun = ListInterpolation[T, {R}];
Needs["DrawGraphics`DrawingMaster`"]
Draw2D[
{(ContourDraw[fun[r], {r, 0, 1}, {\[Theta], 0, 2Pi},
ColorFunction -> Hue] // FineGrainPolygons[0.1, 4]) /.
DrawingTransform[#1Cos[#2] &, #1Sin[#2] &]},
AspectRatio -> Automatic,
Frame -> True,
Background -> Linen];
That first draws the contour plot in r-theta coordinates and then uses
DrawingTransform to convert all the Lines and Polygons to Cartesian
coordinates. FineGrainPolygons is needed to breakup the long straight lines
at the edges so they will transform smoothly.
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
From: dh [mailto:dh at metrohm.ch]
To: mathgroup at smc.vnet.net
Hi Othman,
If I understand your question, you want to change the temperature
radially and keep the same value for all angles.
Here is an example:
T = Table[Exp[-x], {x, 0, 1, 0.1}];
R = Table[x, {x, 0, 1, 0.1}];
fun = ListInterpolation[T, {R}];
ContourPlot[fun[Norm[{x, y}]], {x, -1, 1}, {y, -1, 1}]
This will give some warnings because the PlotRange is recangular and we
extrapolate the function in the corners.
Sincerely, Daniel
othman wrote:
> Hi All
> I'm a new user of Mathematica.The problem is that I started using
Mathematica from the middle not the beginning.
> Anyway, My problem is:
> I have two Matrices
> Temperature= T = [Ax8]
> Radial position = RR = [1x8]
> as an example, let A=1,
> instead of Plotting T vs. RR at xy-axes, I want to map the data in a
cylinderical Coordinates as a contour mapping, whic means I need to "copy"
my data to N times.
> My proposed procedure is to do the following:
>
> Generate a position matrix, [x,y], as follows:
>
> Do [x,y] RR=0,1,.145, Theta = 0,360,M ( M is the step 360/N)
> x = RR*Cos(theta)
> y = RR*Sin(theta)
> and
> T=T @ RR
>
> I would like to know:
> 1. if this is the easy way to do it ?
> 2. How can translate it to Mathematica Code?
>
> Hopefully it is clear!
>
> Thank you in advance!
>
> Othman
>
Prev by Date:
**Re: FindFit with conditionals**
Next by Date:
**Re: string pattern search**
Previous by thread:
** Re: Mapping Data**
Next by thread:
** Temporary style change in a notebook?**
| |