Size in hex bin plots for columndatasource

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.


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 <[email protected]> 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 [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/ff177464-7535-4709-a149-89731c6b0b17%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.