question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Color discontinuity in surfaces defined by arrays that contain an entire row/column of gaps

See original GitHub issue

The 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: fig1

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.

rsz_sphere-disks1

rsz_sphere-disks2

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
archmojcommented, Dec 16, 2019

With n=3, one side of the plot (facing the light) displays undesirable shading: newplot (1)

0reactions
archmojcommented, Dec 16, 2019

And that is not related to connectgaps being enabled or disabled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Surface Plot Data Relates to a Colormap - MathWorks
The CData property of a Surface object contains an indexing array C that associates specific locations in your plot with colors in the...
Read more >
7 Geometry - Rhino Developer Documentation
This script will compare a bunch of points on a curve to their projection on a surface. If the distance exceeds one unit,...
Read more >
Locally refinable gradient meshes supporting branching and ...
In this paper we have described our interpretation of a gradient mesh primitive extended with mathematically exact local refinement, branching ...
Read more >
MATLAB Demystified - University of Hawaii Math Department
process of plotting something by hand you can just have MATLAB generate any ... The colors used are proportional to the surface height...
Read more >
Andy Wilson's Dissertation, DRAFT - UNC Computer Science
rendering acceleration algorithms are made, tested, and sometimes broken. I also thank the agencies who have funded the research in this dissertation. This....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found