Open insertmike opened 7 months ago
No but feel free to take a stab at it.
@flekschas I am open to spending some of my free time to add support for this, however I would appreciate some guidance/ideas on how to achieve this considering your context of the codebase you have. There is multiple means in which this support can be added.
When you are talking about contour I suppose you are talking about to add a simple black thin contour to any point, as you see in this bokeh scatter plot
With your component is just a little complicated to distinguish the points because not exist any contour arount the points
as you see. Add this contour would be a good feature in my opinion:
@masalinas I think you're talking about a different feature: point borders. Contours are something different. But @insertmike also didn't provide much context on what he would like to accomplish so I may be wrong here. @insertmike can you clarify when you have the chance?
E.g:
In your example, you can make the points easier to perceive by reducing the point size and/or opacity.
@insertmike If you're thinking of contour lines as in the example above, here's a rough list of things that you'd have to work on. But basically, I would approach this feature similar to the line connection feature in regl-scatterplot. I.e., it should be optional, and have minimal impact on the library performance.
Rough work items that come to mind:
contours
in init()
similar to pointConnections
setContours()
that calls the worker to compute the contour lines. (similar to setPointConnections()
)showContours
to regl-scatterplot
(similar to showPointConnections
)publicDraw()
function for drawing contour3530
for drawing the contour lines by called contours.draw()
. Keep in mind that during transitions, the contour lines should not be redrawn as lines cannot be interpolated at the moment. See how pointConnections
is handled in that function.destroy()
function./example
. The example should be simple but allow us to easily test the performance with different number of points.Being able to render contour lines would be a fantastic feature. But implementing it is a bit involved. If you want to take a stab at it, please feel free to set up a branch and PR where we can communicate about implementation details. Feel free to ask questions often. It's always best to get answers first before jumping into the implementation phase :)
@flekschas I tried to reduce the opacity like this, but as you see
You have to zoom in a lot to really start to perceive the contours. Can't you change that color outline from black to something that stands out?
@masalinas I'm not really sure what the issue is. Maybe you can open a new issue outline the issue in more detail. The issue at hand is not about point borders but about contour lines.
Is ability to draw contours will be available anytime in the near future?