Patch with white space in them

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?

Thanks.

Hi,

The PR you linked was not ultimately merged at the time. "Patches with holes" is still an open feature request, yet to be implemented. As a result, for complicated contour plots, Bokeh is probably not currently the best choice.

Thanks,

Bryan

···

On May 31, 2018, at 08:30, Paul Brett <[email protected]> wrote:

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.
- https://github.com/bokeh/bokeh/pull/3399
- https://github.com/bokeh/bokeh/issues/2321

Any suggestions on a good path forward?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/bd361b47-8521-4248-88e0-eee2a80e36ef%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
<contour_eggcrate.PNG><first_attempt.PNG><second_attempt.PNG>

Thanks Bryan.

I’ll keep developing what I have been working on with the knowledge we can’t handle more complicated contour plots. At this time it is just an extreme test case for me.

···

On Thursday, May 31, 2018 at 11:43:11 AM UTC-4, Bryan Van de ven wrote:

Hi,

The PR you linked was not ultimately merged at the time. “Patches with holes” is still an open feature request, yet to be implemented. As a result, for complicated contour plots, Bokeh is probably not currently the best choice.

Thanks,

Bryan

On May 31, 2018, at 08:30, Paul Brett [email protected] wrote:

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?

Thanks.


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/bd361b47-8521-4248-88e0-eee2a80e36ef%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

<contour_eggcrate.PNG><first_attempt.PNG><second_attempt.PNG>

Hi,

It's definitely an important feature, so we will get to it at some point, resources permitting.

Thanks,

Bryan

···

On May 31, 2018, at 12:08, Paul Brett <[email protected]> wrote:

Thanks Bryan.

I'll keep developing what I have been working on with the knowledge we can't handle more complicated contour plots. At this time it is just an extreme test case for me.

On Thursday, May 31, 2018 at 11:43:11 AM UTC-4, Bryan Van de ven wrote:
Hi,

The PR you linked was not ultimately merged at the time. "Patches with holes" is still an open feature request, yet to be implemented. As a result, for complicated contour plots, Bokeh is probably not currently the best choice.

Thanks,

Bryan

> On May 31, 2018, at 08:30, Paul Brett <[email protected]> wrote:
>
>
> 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.
> - https://github.com/bokeh/bokeh/pull/3399
> - https://github.com/bokeh/bokeh/issues/2321
>
> Any suggestions on a good path forward?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/bd361b47-8521-4248-88e0-eee2a80e36ef%40continuum.io.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout.
> <contour_eggcrate.PNG><first_attempt.PNG><second_attempt.PNG>

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/891edf0d-ed4c-4725-92b5-b2ab9952a58f%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.