Question: Is the documentation on plots:-densityplot inaccurate regarding usage of the "grid" option?

The documentation on plots:-densityplot says

Any additional arguments are interpreted as options which are specified as equations of the form option = value. For example, the option grid = [m, n] where m and n are positive integers specifies that the plot is to be constructed on an m by n grid at equally spaced points in the ranges a..b and c..d respectively. By default a 49 by 49 grid is used; thus 2401 points are generated, and 2401 colored cells are displayed.

Consider the following simple example

g := proc (x, y) print(x, y); return 55 end proc

plots:-densityplot(g, 1 .. 4, 2 .. 8, grid = [5, 5])




If we look at the output from the print statement inside of we see


That is, there are 16 points in the grid, not 5x5=25.

Is the documentation incorrect or did I miss something?

Please Wait...