Color discontinuity in surfaces defined by arrays that contain an entire row/column of gaps
See original GitHub issueThe surface attribute connectgaps=True
doesn’t work when a coordinate array, x, y, or z,
has an entire row or column filled with nan(s). Moreover the row or column bordered by nan(s) exhibits a color discontinuity:
The above surface is defined by the parameterization x= ucos(v), y=usin(v), z =u^2, u, v in [0,1], and a fixed v-row in the associated meshgrid, filled with nan(s).
I discovered the latter issue in an attempt to plot 169 planar disks mapped onto a sphere. To avoid defining 169 traces of type surface (one for each spherical disk) I extended each disk coordinate array with a column of nan(s), and concatenated all new arrays to get x, y and z coordinate arrays, that define a unique surface, not 169.
With these settings each initial coordinate array, except the first one, has a column of nan(s), both at left and at right, that makes the corresponding disk centers and boundary circles to be mapped to a color that illustrates a sharp discontinuity. I suspect that the columns of nan(s) are not skipped when the colormapping is performed.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top GitHub Comments
With n=3, one side of the plot (facing the light) displays undesirable shading:
And that is not related to
connectgaps
being enabled or disabled.