I’ve been trying to build a capability to plot contours using Bokeh and so far it works pretty well for simple functions. A question I had when I was developing this was whether my implementation could handle more complex contours - something multi-modal like the eggcrate function. I’ve attached an example contour of what I’m trying to create (contour_eggcrate.png) that was generated in another tool. I am able to generate the contours just fine which is nice however I’m having trouble in trying to visualize it as a shaded in entity.
If I just combine the x-y coordinates for the small contours and then the large one into their respective arrays, I get lines connecting the different sets of points and cutouts where lines overlap (first_attempt.png). Using nans to separate them also doesn’t work as they become separate patches (second_attempt.png).
I was looking through a few different github links and I was somewhat confused on whether or not there’s a good solution. A lot of the conversation seems more geared towards geospatial data formats that I am much less familiar with so I can’t assess whether or not a solution exists. Notionally, I could see what I’m going is similar to plotting a landmass with a lake cut out in the middle of it.
Any suggestions on a good path forward?