Make surface contour levels configurable#3469
Conversation
…isable nticks if false draw ntick contours
|
Hmm. In #485, we propose making surface contour settings on-par with the attributes for
? If not, could you explain why your new attributes make more sense for |
I thought this setup could provide more flexibility so that the users can put the contours where they may need. |
|
I would prefer reaching parity with the attributes for |
Would you like me to implement |
Definitely - the primary goal should be that you can take anything that works in a Then at some point we can extend BOTH of these to support an array of contour values - perhaps |
src/traces/surface/attributes.js
Outdated
| 'Must be positive.' | ||
| ].join(' ') | ||
| }, | ||
| locations: { |
There was a problem hiding this comment.
Do we really need locations and relative to ✅ this feature?
I would prefer making surface on-par with contour to start.
There was a problem hiding this comment.
Good call. Let's put this on 1.47.0.
There was a problem hiding this comment.
Dropped those features in 98aebc5 as surface code is already pretty complicated for us to maintain.
| useNewLevels[i] = true; | ||
|
|
||
| for(j = this.contourStart[i]; j < this.contourEnd[i]; j += this.contourSize[i]) { | ||
| value = j * this.scene.dataScale[i]; |
There was a problem hiding this comment.
Have you tried re-using setContours? It probably gives similar results, but it would be nice to double-check.
There was a problem hiding this comment.
I tried that on a different branch. Also wanted to add autocontours and ncontours in this PR.
But unfortunately that could add too much complexity while surface contours are in 3 directions not only z.
|
It would've been nice to bring this a bit more on-par with This will be a nice feature for 1.47.0 💃 |
Attempt to address original ticket #485 to make surface contours adjustable and aligned with
heatmap&contourtrace.In this PR
contour.start,contour.endandcontour.sizeare added and could be applied by the user to slice surface graphs on desired positions other than tick positions which is the default behaviour.Codepen example
@plotly/plotly_js