RE: Polar(List)DensityPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg21298] RE: [mg21273] Polar(List)DensityPlot
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Wed, 22 Dec 1999 00:34:50 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Wilfred Meyboom asked how to make a PolarDensityPlot. ------------------------- A few weeks ago I thought about writing a package that would do this with all the options you could want and everything. I decided not to because it would be a non-trivial effort, and I don't personally have a need for it. Any way the lines below will make a very nice PolarDensityPlot, except I don't include the Ticks, for the following case. PolarDensityPlot[3*theta+1/(0.2+r),{theta, 0, 2 Pi}, {r,0,2}] -------------------------- You can see that I use DensityPlot with a rectangular to polar transformation. Also 'mask' paints white space over the part outside the desired circle. I find DensityPlot needs a very high setting for PlotPoints to get a nice graphic. gr=Graphics[DensityPlot[ Sin[3 ArcTan[x,y]]+1/(0.2+Sqrt[x^2+y^2]), {x,-2,2},{y,-2,2}, PlotPoints->250, Mesh->False, ColorFunction->Hue, Frame->False, DisplayFunction->Identity ] ]; mask=Graphics[{GrayLevel[1], Polygon[ Join[ Table[{2 Cos[t],2 Sin[t]},{t,0,2*Pi,0.017}], {{2,0},{50,0},{50,50},{-50,50},{-50,-50}, {50,-50},{50,0} } ] ] }]; Show[{gr,mask}, DisplayFunction->$DisplayFunction, PlotRange->{{-2,2},{-2,2}} ]; -------------------- Regards, Ted Ersek On 12-18-99 Mathematica tips, tricks at http://www.dot.net.au/~elisha/ersek/Tricks.html had a major update