Skip to main content
9 events
when toggle format what by license comment
Jul 1, 2021 at 1:43 comment added Michael E2 @ABCDEMMM The array C for pcolor(XX, YY, C) is the array c above for MeshShading. (MeshShading automatically cycles through the colors, so there's no need for remat().)
Jul 1, 2021 at 1:36 comment added ABCDEMMM do we need ListParametricPlot, since input array for pcolor is 2d arrays/matrix...
Jul 1, 2021 at 1:33 comment added Michael E2 @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}]]
Jul 1, 2021 at 0:59 comment added ABCDEMMM what is the correct command in Mathamatica for "pcolor", if we search "Pseudocolor plot mathematica", the first item is ListDensityPlot ...
Jul 1, 2021 at 0:57 comment added Michael E2 @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"]
Jul 1, 2021 at 0:20 comment added ABCDEMMM can we use ListDensityPlot in this case (pcolor)?
Apr 14, 2015 at 2:27 comment added Michael E2 Note: It seems there may be a V10 bug related to this code. See mathematica.stackexchange.com/questions/79819/… for more details.
Apr 11, 2015 at 13:58 history edited Michael E2 CC BY-SA 3.0
Fixed code, typo
Apr 11, 2015 at 2:27 history answered Michael E2 CC BY-SA 3.0