Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    $\begingroup$ Note: It seems there may be a V10 bug related to this code. See mathematica.stackexchange.com/questions/79819/… for more details. $\endgroup$ Commented Apr 14, 2015 at 2:27
  • $\begingroup$ can we use ListDensityPlot in this case (pcolor)? $\endgroup$ Commented Jul 1, 2021 at 0:20
  • $\begingroup$ @ABCDEMMM ListDensityPlot will produce gradient-colored graphics, not uniformly colored polygons. Other than that, something like this?: r = Range[40.]/20; theta = Pi Range[40.]/20; m = Flatten[Table[{r1 Cos[theta1], r1 Sin[theta1], r1 Cos[2. theta1]}, {theta1, theta}, {r1, r}], 1]; ListDensityPlot[m, ColorFunction -> "Rainbow"] $\endgroup$ Commented Jul 1, 2021 at 0:57
  • $\begingroup$ what is the correct command in Mathamatica for "pcolor", if we search "Pseudocolor plot mathematica", the first item is ListDensityPlot ... $\endgroup$ Commented Jul 1, 2021 at 0:59
  • $\begingroup$ @ABCDEMMM pcolor(C) is roughly equivalent to ArrayPlot or MatrixPlot (not sure why Mathematica has both. As for the parametric grid examples in the Matlab doc page for pcolor(), I'd use ParametricPlot and MeshShading. It takes some figuring, I suppose, but there is not a top level command for it. Example "Specify Parametric Grid": colorFn = ColorData["BlueGreenYellow"]; c = {#, Reverse@#} &@Range[0., 18.]/18; ParametricPlot[{2 x y, x^2 - y^2}, {x, -3, 3}, {y, -3, 3}, Mesh -> 18, MeshShading -> Map[colorFn, c, {2}]] $\endgroup$ Commented Jul 1, 2021 at 1:33