☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Size in hex bin plots for columndatasource

Community Support
Samira_Kumar
Samira_Kumar

Hi,

I’m trying to make a hex bin plot like plot.hexbin(‘x’,‘y’,size=1,source=source2)

But I get this error: TypeError: unsupported operand type(s) for /: ‘str’ and 'str’

I guess this is because both x and y are called through columndatasource. Any solution/workaround for this? Or any issue from my end.?

Any inputs are appreciated.

Thanks.


⌁   Link to post
Bryan
Bryan

Hi,

The args for hex bin can only be NumPy Arrays. From the docstring:

  Args:
    x (array[float]) :
      A NumPy array of x-coordinates to bin into haxagonal tiles.
    y (array[float]) :
      A NumPy array of y-coordinates to bin into haxagonal tiles.

Perhaps we can add better argument checking make this more obvious.

Thanks,

Bryan

···

On Mar 29, 2018, at 18:39, Samira Kumar <samirakumar107@gmail.com> wrote:

Hi,

I'm trying to make a hex bin plot like plot.hexbin('x','y',size=1,source=source2)

But I get this error: TypeError: unsupported operand type(s) for /: 'str' and 'str'

I guess this is because both x and y are called through columndatasource. Any solution/workaround for this? Or any issue from my end.?

Any inputs are appreciated.

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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ff177464-7535-4709-a149-89731c6b0b17%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled