circle plot - hover or add text?

Hi all,

I’ve made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I’ve got a little stuck though. I’d like to either:

  1. Add Hover tooltips
  2. Add text

I can’t seem to do either.

The hover just doesn’t seem to work for the circle plot and the text doesn’t seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

Hi Sarah,

It seems like you’ve hit two new issues to consider for categorical plots: a) text placement and b) circle glyph hit-testing for the hover tool.

In the meantime at least, you can specify rect glyphs to enable the hover tool, although I know that’s not the most aesthetically pleasing (or appropriate) for punchcard-style graphics. I’ve forked your example here, and you can view it in nbviewer here.

I’ll talk with the developers in the morning to see what issues need to be opened on the repo, so you’ll know as soon as they are addressed. :slight_smile:

Thanks for trying out Bokeh, and extra thanks for bringing this to our attention!

Regards,

Karan

···

On Tue, May 13, 2014 at 11:30 PM, Sarah Bird [email protected] wrote:

Hi all,

I’ve made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I’ve got a little stuck though. I’d like to either:

  1. Add Hover tooltips
  2. Add text

I can’t seem to do either.

The hover just doesn’t seem to work for the circle plot and the text doesn’t seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

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/9da783ab-ad98-49ce-b736-448cb28b0d81%40continuum.io.

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

Another style…

I did some little changes to making the alpha (“intensity”) the “changing value” in equally sized squares… a “sort” of github style punchcard :wink:
Hope it helps in the meantime we fix the issues raised… http://nbviewer.ipython.org/gist/damianavila/aa053a04ea6d920e5a86

···

On Wed, May 14, 2014 at 2:40 AM, Karan Dodia [email protected] wrote:

Hi Sarah,

It seems like you’ve hit two new issues to consider for categorical plots: a) text placement and b) circle glyph hit-testing for the hover tool.

In the meantime at least, you can specify rect glyphs to enable the hover tool, although I know that’s not the most aesthetically pleasing (or appropriate) for punchcard-style graphics. I’ve forked your example here, and you can view it in nbviewer here.

I’ll talk with the developers in the morning to see what issues need to be opened on the repo, so you’ll know as soon as they are addressed. :slight_smile:

Thanks for trying out Bokeh, and extra thanks for bringing this to our attention!

Regards,

Karan

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/CAOvoNRT4Qq-4TEh_U5_7StBeEFf2C5qFm-VWp_HTF7GMTdkqzA%40mail.gmail.com.

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

On Tue, May 13, 2014 at 11:30 PM, Sarah Bird [email protected] wrote:

Hi all,

I’ve made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I’ve got a little stuck though. I’d like to either:

  1. Add Hover tooltips
  2. Add text

I can’t seem to do either.

The hover just doesn’t seem to work for the circle plot and the text doesn’t seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

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/9da783ab-ad98-49ce-b736-448cb28b0d81%40continuum.io.

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

Hi Sarah,

It does look like you have found a bug with hit testing circles when there are categorical ranges present. I have submitted a new issue you can track here:

  https://github.com/ContinuumIO/bokeh/issues/624

We will try to have this issue resolved in GitHub master in the very near future, and also we will be starting automated nightly package builds soon as well, so that people can get fixes or try out dev versions in between releases. I will send out a message to the mailing list when these are available.

Regarding the text, there also appears to be an issue but there may be a workaround. The issue seems to be with pulling the data out of a ColumnDataSource by name. I think this is probably because of all the glyphs, text is the one that has strings as values, and this is confusing the parameter deduction. I will file an issue for this as well. But if you just pass in the data as arguments directly to the renderer you can get text to render:

  # x = [ .... ]
  # y = [ .... ]
  text(x, y, text="foo", angle=0,
       source=source,
       x_range=datasets,
       y_range=buckets)

That's passing in the lists x and y directly, instead of passing the string names "x" and "y", You can also pass in a list of text values for the "text" parameter as well. Let me know if that makes sense or if a more complete example is necessary.

Thanks for your feedback!

Bryan

···

On May 13, 2014, at 11:30 PM, Sarah Bird <[email protected]> wrote:

Hi all,

I've made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I've got a little stuck though. I'd like to either:
1) Add Hover tooltips
2) Add text

I can't seem to do either.

The hover just doesn't seem to work for the circle plot and the text doesn't seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

--
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/9da783ab-ad98-49ce-b736-448cb28b0d81%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Putting two and two together, here’s Damián’s alpha punchcard with text labels: http://nbviewer.ipython.org/urls/gist.githubusercontent.com/kdodia/df3b244f60d36dbdb803/raw/2f65fcde19984738ebc2c5e19db33869123a0ac1/punchcard_square.ipynb

Karan

···

On Wed, May 14, 2014 at 9:07 AM, Bryan Van de Ven [email protected] wrote:

Hi Sarah,

It does look like you have found a bug with hit testing circles when there are categorical ranges present. I have submitted a new issue you can track here:

    [https://github.com/ContinuumIO/bokeh/issues/624](https://github.com/ContinuumIO/bokeh/issues/624)

We will try to have this issue resolved in GitHub master in the very near future, and also we will be starting automated nightly package builds soon as well, so that people can get fixes or try out dev versions in between releases. I will send out a message to the mailing list when these are available.

Regarding the text, there also appears to be an issue but there may be a workaround. The issue seems to be with pulling the data out of a ColumnDataSource by name. I think this is probably because of all the glyphs, text is the one that has strings as values, and this is confusing the parameter deduction. I will file an issue for this as well. But if you just pass in the data as arguments directly to the renderer you can get text to render:

x = [ … ]

y = [ … ]

text(x, y, text=“foo”, angle=0,

   source=source,

   x_range=datasets,

   y_range=buckets)

That’s passing in the lists x and y directly, instead of passing the string names “x” and “y”, You can also pass in a list of text values for the “text” parameter as well. Let me know if that makes sense or if a more complete example is necessary.

Thanks for your feedback!

Bryan

On May 13, 2014, at 11:30 PM, Sarah Bird [email protected] wrote:

Hi all,

I’ve made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I’ve got a little stuck though. I’d like to either:

  1. Add Hover tooltips
  1. Add text

I can’t seem to do either.

The hover just doesn’t seem to work for the circle plot and the text doesn’t seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

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/9da783ab-ad98-49ce-b736-448cb28b0d81%40continuum.io.

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

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/4D125801-7A22-4244-A5A8-C207D50C7410%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Wow!

Thank you all so much. Combining all your words of wisdom, I was able to come up with a hack that does what I want it to. Plot white rectangles that the hovertool can latch on to and then stick the black circles on top - works pretty nicely!

See
the notebook here: https://github.com/open-contracting/ocdata-categorize/blob/master/experiments/Punchcard%20Demo%20-%20with%20Hover.ipynb

(How do you guys get nbviewer to show your notebooks - when i try the plot doesn’t come out?)

Really appreciate you opening an issue, I’ve subscribed, and will be really interested in seeing the fix - certainly would like to contribute in the future so this will be a good learning.

I was also thinking about doing an intensity style plot for the normalized version of the same graphic so the alpha stuff is super helpful too.

Thanks again.

Bird

···

On 14 May 2014 07:55, Karan Dodia [email protected] wrote:

Putting two and two together, here’s Damián’s alpha punchcard with text labels: http://nbviewer.ipython.org/urls/gist.githubusercontent.com/kdodia/df3b244f60d36dbdb803/raw/2f65fcde19984738ebc2c5e19db33869123a0ac1/punchcard_square.ipynb

Karan

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/CAOvoNRRszoT5wt_MD%2BOhsDgBJBSjCsVEZWrTk-51Vqfk-jpbpQ%40mail.gmail.com.

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


Sarah Bird

[email protected]

skype: birdsarah

www.linkedin.com/in/birdsarah/

Aptivate - Ethical IT for International Development

www.aptivate.org

On Wed, May 14, 2014 at 9:07 AM, Bryan Van de Ven [email protected] wrote:

Hi Sarah,

It does look like you have found a bug with hit testing circles when there are categorical ranges present. I have submitted a new issue you can track here:

    [https://github.com/ContinuumIO/bokeh/issues/624](https://github.com/ContinuumIO/bokeh/issues/624)

We will try to have this issue resolved in GitHub master in the very near future, and also we will be starting automated nightly package builds soon as well, so that people can get fixes or try out dev versions in between releases. I will send out a message to the mailing list when these are available.

Regarding the text, there also appears to be an issue but there may be a workaround. The issue seems to be with pulling the data out of a ColumnDataSource by name. I think this is probably because of all the glyphs, text is the one that has strings as values, and this is confusing the parameter deduction. I will file an issue for this as well. But if you just pass in the data as arguments directly to the renderer you can get text to render:

x = [ … ]

y = [ … ]

text(x, y, text=“foo”, angle=0,

   source=source,

   x_range=datasets,

   y_range=buckets)

That’s passing in the lists x and y directly, instead of passing the string names “x” and “y”, You can also pass in a list of text values for the “text” parameter as well. Let me know if that makes sense or if a more complete example is necessary.

Thanks for your feedback!

Bryan

On May 13, 2014, at 11:30 PM, Sarah Bird [email protected] wrote:

Hi all,

I’ve made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I’ve got a little stuck though. I’d like to either:

  1. Add Hover tooltips
  1. Add text

I can’t seem to do either.

The hover just doesn’t seem to work for the circle plot and the text doesn’t seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

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/9da783ab-ad98-49ce-b736-448cb28b0d81%40continuum.io.

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

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/4D125801-7A22-4244-A5A8-C207D50C7410%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Nice Sarah!

Btw, answering your question, there is an issue about nbviewer… but now we have a fix in a PR to be pushed probably today…

Cheers.

···

On Wed, May 14, 2014 at 1:36 PM, Sarah Bird [email protected] wrote:

Wow!

Thank you all so much. Combining all your words of wisdom, I was able to come up with a hack that does what I want it to. Plot white rectangles that the hovertool can latch on to and then stick the black circles on top - works pretty nicely!

See
the notebook here: https://github.com/open-contracting/ocdata-categorize/blob/master/experiments/Punchcard%20Demo%20-%20with%20Hover.ipynb

(How do you guys get nbviewer to show your notebooks - when i try the plot doesn’t come out?)

Really appreciate you opening an issue, I’ve subscribed, and will be really interested in seeing the fix - certainly would like to contribute in the future so this will be a good learning.

I was also thinking about doing an intensity style plot for the normalized version of the same graphic so the alpha stuff is super helpful too.

Thanks again.

Bird

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/CA%2B-Xp4_5X%3D7ok5XwGcuwAPFahqBEvnRQ9URfLVLhoLRXrDOzVw%40mail.gmail.com.

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

On 14 May 2014 07:55, Karan Dodia [email protected] wrote:

Putting two and two together, here’s Damián’s alpha punchcard with text labels: http://nbviewer.ipython.org/urls/gist.githubusercontent.com/kdodia/df3b244f60d36dbdb803/raw/2f65fcde19984738ebc2c5e19db33869123a0ac1/punchcard_square.ipynb

Karan

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/CAOvoNRRszoT5wt_MD%2BOhsDgBJBSjCsVEZWrTk-51Vqfk-jpbpQ%40mail.gmail.com.

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


Sarah Bird

[email protected]

skype: birdsarah

www.linkedin.com/in/birdsarah/

Aptivate - Ethical IT for International Development

www.aptivate.org

On Wed, May 14, 2014 at 9:07 AM, Bryan Van de Ven [email protected] wrote:

Hi Sarah,

It does look like you have found a bug with hit testing circles when there are categorical ranges present. I have submitted a new issue you can track here:

    [https://github.com/ContinuumIO/bokeh/issues/624](https://github.com/ContinuumIO/bokeh/issues/624)

We will try to have this issue resolved in GitHub master in the very near future, and also we will be starting automated nightly package builds soon as well, so that people can get fixes or try out dev versions in between releases. I will send out a message to the mailing list when these are available.

Regarding the text, there also appears to be an issue but there may be a workaround. The issue seems to be with pulling the data out of a ColumnDataSource by name. I think this is probably because of all the glyphs, text is the one that has strings as values, and this is confusing the parameter deduction. I will file an issue for this as well. But if you just pass in the data as arguments directly to the renderer you can get text to render:

x = [ … ]

y = [ … ]

text(x, y, text=“foo”, angle=0,

   source=source,

   x_range=datasets,

   y_range=buckets)

That’s passing in the lists x and y directly, instead of passing the string names “x” and “y”, You can also pass in a list of text values for the “text” parameter as well. Let me know if that makes sense or if a more complete example is necessary.

Thanks for your feedback!

Bryan

On May 13, 2014, at 11:30 PM, Sarah Bird [email protected] wrote:

Hi all,

I’ve made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I’ve got a little stuck though. I’d like to either:

  1. Add Hover tooltips
  1. Add text

I can’t seem to do either.

The hover just doesn’t seem to work for the circle plot and the text doesn’t seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

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/9da783ab-ad98-49ce-b736-448cb28b0d81%40continuum.io.

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

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/4D125801-7A22-4244-A5A8-C207D50C7410%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

That’s a nifty hack!!

Unfortunately Bokeh 0.4.4 has a glitch that prevents nbviewer from loading the JavaScript with proper timing, but our friend Damián will be merging this PR today so master will be fixed soon. If you look at the original notebook I linked, the first couple of cells show how I ensure that I’m not on 0.4.4.

Thanks again!

Karan

···

On Wed, May 14, 2014 at 11:36 AM, Sarah Bird [email protected] wrote:

Wow!

Thank you all so much. Combining all your words of wisdom, I was able to come up with a hack that does what I want it to. Plot white rectangles that the hovertool can latch on to and then stick the black circles on top - works pretty nicely!

See
the notebook here: https://github.com/open-contracting/ocdata-categorize/blob/master/experiments/Punchcard%20Demo%20-%20with%20Hover.ipynb

(How do you guys get nbviewer to show your notebooks - when i try the plot doesn’t come out?)

Really appreciate you opening an issue, I’ve subscribed, and will be really interested in seeing the fix - certainly would like to contribute in the future so this will be a good learning.

I was also thinking about doing an intensity style plot for the normalized version of the same graphic so the alpha stuff is super helpful too.

Thanks again.

Bird

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/CA%2B-Xp4_5X%3D7ok5XwGcuwAPFahqBEvnRQ9URfLVLhoLRXrDOzVw%40mail.gmail.com.

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

On 14 May 2014 07:55, Karan Dodia [email protected] wrote:

Putting two and two together, here’s Damián’s alpha punchcard with text labels: http://nbviewer.ipython.org/urls/gist.githubusercontent.com/kdodia/df3b244f60d36dbdb803/raw/2f65fcde19984738ebc2c5e19db33869123a0ac1/punchcard_square.ipynb

Karan

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/CAOvoNRRszoT5wt_MD%2BOhsDgBJBSjCsVEZWrTk-51Vqfk-jpbpQ%40mail.gmail.com.

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


Sarah Bird

[email protected]

skype: birdsarah

www.linkedin.com/in/birdsarah/

Aptivate - Ethical IT for International Development

www.aptivate.org

On Wed, May 14, 2014 at 9:07 AM, Bryan Van de Ven [email protected] wrote:

Hi Sarah,

It does look like you have found a bug with hit testing circles when there are categorical ranges present. I have submitted a new issue you can track here:

    [https://github.com/ContinuumIO/bokeh/issues/624](https://github.com/ContinuumIO/bokeh/issues/624)

We will try to have this issue resolved in GitHub master in the very near future, and also we will be starting automated nightly package builds soon as well, so that people can get fixes or try out dev versions in between releases. I will send out a message to the mailing list when these are available.

Regarding the text, there also appears to be an issue but there may be a workaround. The issue seems to be with pulling the data out of a ColumnDataSource by name. I think this is probably because of all the glyphs, text is the one that has strings as values, and this is confusing the parameter deduction. I will file an issue for this as well. But if you just pass in the data as arguments directly to the renderer you can get text to render:

x = [ … ]

y = [ … ]

text(x, y, text=“foo”, angle=0,

   source=source,

   x_range=datasets,

   y_range=buckets)

That’s passing in the lists x and y directly, instead of passing the string names “x” and “y”, You can also pass in a list of text values for the “text” parameter as well. Let me know if that makes sense or if a more complete example is necessary.

Thanks for your feedback!

Bryan

On May 13, 2014, at 11:30 PM, Sarah Bird [email protected] wrote:

Hi all,

I’ve made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I’ve got a little stuck though. I’d like to either:

  1. Add Hover tooltips
  1. Add text

I can’t seem to do either.

The hover just doesn’t seem to work for the circle plot and the text doesn’t seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

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/9da783ab-ad98-49ce-b736-448cb28b0d81%40continuum.io.

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

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/4D125801-7A22-4244-A5A8-C207D50C7410%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Got it - thanks Karan!

···

On 14 May 2014 09:53, Karan Dodia [email protected] wrote:

That’s a nifty hack!!

Unfortunately Bokeh 0.4.4 has a glitch that prevents nbviewer from loading the JavaScript with proper timing, but our friend Damián will be merging this PR today so master will be fixed soon. If you look at the original notebook I linked, the first couple of cells show how I ensure that I’m not on 0.4.4.

Thanks again!

Karan

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/CAOvoNRQee3QLk4_jQWr9bNukTibejHJyPWVbW%3DtTJzJsc5r-QQ%40mail.gmail.com.

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


Sarah Bird

[email protected]

skype: birdsarah

www.linkedin.com/in/birdsarah/

Aptivate - Ethical IT for International Development

www.aptivate.org

On Wed, May 14, 2014 at 11:36 AM, Sarah Bird [email protected] wrote:

Wow!

Thank you all so much. Combining all your words of wisdom, I was able to come up with a hack that does what I want it to. Plot white rectangles that the hovertool can latch on to and then stick the black circles on top - works pretty nicely!

See
the notebook here: https://github.com/open-contracting/ocdata-categorize/blob/master/experiments/Punchcard%20Demo%20-%20with%20Hover.ipynb

(How do you guys get nbviewer to show your notebooks - when i try the plot doesn’t come out?)

Really appreciate you opening an issue, I’ve subscribed, and will be really interested in seeing the fix - certainly would like to contribute in the future so this will be a good learning.

I was also thinking about doing an intensity style plot for the normalized version of the same graphic so the alpha stuff is super helpful too.

Thanks again.

Bird

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/CA%2B-Xp4_5X%3D7ok5XwGcuwAPFahqBEvnRQ9URfLVLhoLRXrDOzVw%40mail.gmail.com.

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

On 14 May 2014 07:55, Karan Dodia [email protected] wrote:

Putting two and two together, here’s Damián’s alpha punchcard with text labels: http://nbviewer.ipython.org/urls/gist.githubusercontent.com/kdodia/df3b244f60d36dbdb803/raw/2f65fcde19984738ebc2c5e19db33869123a0ac1/punchcard_square.ipynb

Karan

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/CAOvoNRRszoT5wt_MD%2BOhsDgBJBSjCsVEZWrTk-51Vqfk-jpbpQ%40mail.gmail.com.

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


Sarah Bird

[email protected]

skype: birdsarah

www.linkedin.com/in/birdsarah/

Aptivate - Ethical IT for International Development

www.aptivate.org

On Wed, May 14, 2014 at 9:07 AM, Bryan Van de Ven [email protected] wrote:

Hi Sarah,

It does look like you have found a bug with hit testing circles when there are categorical ranges present. I have submitted a new issue you can track here:

    [https://github.com/ContinuumIO/bokeh/issues/624](https://github.com/ContinuumIO/bokeh/issues/624)

We will try to have this issue resolved in GitHub master in the very near future, and also we will be starting automated nightly package builds soon as well, so that people can get fixes or try out dev versions in between releases. I will send out a message to the mailing list when these are available.

Regarding the text, there also appears to be an issue but there may be a workaround. The issue seems to be with pulling the data out of a ColumnDataSource by name. I think this is probably because of all the glyphs, text is the one that has strings as values, and this is confusing the parameter deduction. I will file an issue for this as well. But if you just pass in the data as arguments directly to the renderer you can get text to render:

x = [ … ]

y = [ … ]

text(x, y, text=“foo”, angle=0,

   source=source,

   x_range=datasets,

   y_range=buckets)

That’s passing in the lists x and y directly, instead of passing the string names “x” and “y”, You can also pass in a list of text values for the “text” parameter as well. Let me know if that makes sense or if a more complete example is necessary.

Thanks for your feedback!

Bryan

On May 13, 2014, at 11:30 PM, Sarah Bird [email protected] wrote:

Hi all,

I’ve made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I’ve got a little stuck though. I’d like to either:

  1. Add Hover tooltips
  1. Add text

I can’t seem to do either.

The hover just doesn’t seem to work for the circle plot and the text doesn’t seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

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/9da783ab-ad98-49ce-b736-448cb28b0d81%40continuum.io.

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

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/4D125801-7A22-4244-A5A8-C207D50C7410%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thanks Damian, my plots are now live - http://ocds.aptivate.org/opendatacomparison/datamap/

···

On 14 May 2014 09:42, Damian Avila [email protected] wrote:

Nice Sarah!

Btw, answering your question, there is an issue about nbviewer… but now we have a fix in a PR to be pushed probably today…

Cheers.

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/CAM9Ly3GwnrPhw3qBm0WYJEp%3DZ3y3O3p5t8fjLeLrsiqoN5Jaew%40mail.gmail.com.

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


Sarah Bird

[email protected]

skype: birdsarah

www.linkedin.com/in/birdsarah/

Aptivate - Ethical IT for International Development

www.aptivate.org

On Wed, May 14, 2014 at 1:36 PM, Sarah Bird [email protected] wrote:

Wow!

Thank you all so much. Combining all your words of wisdom, I was able to come up with a hack that does what I want it to. Plot white rectangles that the hovertool can latch on to and then stick the black circles on top - works pretty nicely!

See
the notebook here: https://github.com/open-contracting/ocdata-categorize/blob/master/experiments/Punchcard%20Demo%20-%20with%20Hover.ipynb

(How do you guys get nbviewer to show your notebooks - when i try the plot doesn’t come out?)

Really appreciate you opening an issue, I’ve subscribed, and will be really interested in seeing the fix - certainly would like to contribute in the future so this will be a good learning.

I was also thinking about doing an intensity style plot for the normalized version of the same graphic so the alpha stuff is super helpful too.

Thanks again.

Bird

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/CA%2B-Xp4_5X%3D7ok5XwGcuwAPFahqBEvnRQ9URfLVLhoLRXrDOzVw%40mail.gmail.com.

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

On 14 May 2014 07:55, Karan Dodia [email protected] wrote:

Putting two and two together, here’s Damián’s alpha punchcard with text labels: http://nbviewer.ipython.org/urls/gist.githubusercontent.com/kdodia/df3b244f60d36dbdb803/raw/2f65fcde19984738ebc2c5e19db33869123a0ac1/punchcard_square.ipynb

Karan

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/CAOvoNRRszoT5wt_MD%2BOhsDgBJBSjCsVEZWrTk-51Vqfk-jpbpQ%40mail.gmail.com.

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


Sarah Bird

[email protected]

skype: birdsarah

www.linkedin.com/in/birdsarah/

Aptivate - Ethical IT for International Development

www.aptivate.org

On Wed, May 14, 2014 at 9:07 AM, Bryan Van de Ven [email protected] wrote:

Hi Sarah,

It does look like you have found a bug with hit testing circles when there are categorical ranges present. I have submitted a new issue you can track here:

    [https://github.com/ContinuumIO/bokeh/issues/624](https://github.com/ContinuumIO/bokeh/issues/624)

We will try to have this issue resolved in GitHub master in the very near future, and also we will be starting automated nightly package builds soon as well, so that people can get fixes or try out dev versions in between releases. I will send out a message to the mailing list when these are available.

Regarding the text, there also appears to be an issue but there may be a workaround. The issue seems to be with pulling the data out of a ColumnDataSource by name. I think this is probably because of all the glyphs, text is the one that has strings as values, and this is confusing the parameter deduction. I will file an issue for this as well. But if you just pass in the data as arguments directly to the renderer you can get text to render:

x = [ … ]

y = [ … ]

text(x, y, text=“foo”, angle=0,

   source=source,

   x_range=datasets,

   y_range=buckets)

That’s passing in the lists x and y directly, instead of passing the string names “x” and “y”, You can also pass in a list of text values for the “text” parameter as well. Let me know if that makes sense or if a more complete example is necessary.

Thanks for your feedback!

Bryan

On May 13, 2014, at 11:30 PM, Sarah Bird [email protected] wrote:

Hi all,

I’ve made a punchcard style plot (check out the iPythonNotebook) using a circle plot.

I’ve got a little stuck though. I’d like to either:

  1. Add Hover tooltips
  1. Add text

I can’t seem to do either.

The hover just doesn’t seem to work for the circle plot and the text doesn’t seem to want to plot on a categorical axis.

Am I missing something? Or other suggestions of how to add labels for each of the circles?

Sincerely,

Sarah Bird

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/9da783ab-ad98-49ce-b736-448cb28b0d81%40continuum.io.

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

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/4D125801-7A22-4244-A5A8-C207D50C7410%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.