2D- y Axis data

Hi all,

I’m having a problem with plotting 2-dimensional y-axis data using the circle glyph.

e.g. if I have

x = [0,1,2,3,4]
x.shape ->(5,)

``

and
y = [[ 0, 0],
[ 10, 100],

[ 20, 200],

[ 30, 300],

[ 40, 400]]

y.shape -> (5,2)

``

bokeh only seems to pick the values in the first row of y and plots only those or doesn’t plot at all.

Is there a way of doing this without necessarily iterating over each row?

Thanks : ) !

Hi,

Your question is a bit vague. In general Bokeh glyphs operate on single arrays/columns of scalar data. There are some exceptions, such as multi_line, which can accept "arrays of arrays". There are a few possible things that might help you, but it's not really clear what you are tying to plot (lines? scatters? something else?) or what you have already tried (please always provide some code with questions) so it's hard to offer any specific advice.

Thanks,

Bryan

···

On Feb 11, 2019, at 05:29, Mulan-94 <[email protected]> wrote:

Hi all,

I'm having a problem with plotting 2-dimensional y-axis data using the circle glyph.

e.g. if I have

x = [0,1,2,3,4]
x.shape ->(5,)
and
y = [[ 0, 0],
       [ 10, 100],
       [ 20, 200],
       [ 30, 300],
       [ 40, 400]]
y.shape -> (5,2)

bokeh only seems to pick the values in the first row of y and plots only those or doesn't plot at all.
Is there a way of doing this without necessarily iterating over each row?

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/24f971e4-2e4f-428a-8009-bc538d9c864a%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Oh Sorry about that.

I would like to do a scatter plot. I’m trying to plot some multidimensional data with x(1500) and y = (1500,119)

I’ve tried to do this with the circle glyph.

···

On Monday, 11 February 2019 18:32:27 UTC+2, Bryan Van de ven wrote:

Hi,

Your question is a bit vague. In general Bokeh glyphs operate on single arrays/columns of scalar data. There are some exceptions, such as multi_line, which can accept “arrays of arrays”. There are a few possible things that might help you, but it’s not really clear what you are tying to plot (lines? scatters? something else?) or what you have already tried (please always provide some code with questions) so it’s hard to offer any specific advice.

Thanks,

Bryan

On Feb 11, 2019, at 05:29, Mulan-94 [email protected] wrote:

Hi all,

I’m having a problem with plotting 2-dimensional y-axis data using the circle glyph.

e.g. if I have

x = [0,1,2,3,4]

x.shape ->(5,)

and

y = [[ 0, 0],

   [ 10, 100],
   [ 20, 200],
   [ 30, 300],
   [ 40, 400]]

y.shape -> (5,2)

bokeh only seems to pick the values in the first row of y and plots only those or doesn’t plot at all.

Is there a way of doing this without necessarily iterating over each row?

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/24f971e4-2e4f-428a-8009-bc538d9c864a%40continuum.io.

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

Hi,

The properties of scatter glyphs like circle are all each driven by a single columns of data at a time. So you can either:

* make multiple calls to circle, one for each set of data
* combine all the data into one set of columns that drive a single call to the glyph

If you do combine the data, you can still apply different colors or shapes, using color or marker mappings. See this example, which plots all the "iris" data using a single call, but maps different species to different colors/markers:

  https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/marker_map.py

Thanks,

Bryan

···

On Feb 11, 2019, at 23:30, Mulan-94 <[email protected]> wrote:

Oh Sorry about that.

I would like to do a scatter plot. I'm trying to plot some multidimensional data with x(1500) and y = (1500,119)
I've tried to do this with the circle glyph.

On Monday, 11 February 2019 18:32:27 UTC+2, Bryan Van de ven wrote:
Hi,

Your question is a bit vague. In general Bokeh glyphs operate on single arrays/columns of scalar data. There are some exceptions, such as multi_line, which can accept "arrays of arrays". There are a few possible things that might help you, but it's not really clear what you are tying to plot (lines? scatters? something else?) or what you have already tried (please always provide some code with questions) so it's hard to offer any specific advice.

Thanks,

Bryan

> On Feb 11, 2019, at 05:29, Mulan-94 <[email protected]> wrote:
>
> Hi all,
>
> I'm having a problem with plotting 2-dimensional y-axis data using the circle glyph.
>
> e.g. if I have
>
> x = [0,1,2,3,4]
> x.shape ->(5,)
> and
> y = [[ 0, 0],
> [ 10, 100],
> [ 20, 200],
> [ 30, 300],
> [ 40, 400]]
> y.shape -> (5,2)
>
> bokeh only seems to pick the values in the first row of y and plots only those or doesn't plot at all.
> Is there a way of doing this without necessarily iterating over each row?
>
> 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/24f971e4-2e4f-428a-8009-bc538d9c864a%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/10da4c47-2726-4e1f-ab3a-a5ea5c73ceb4%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.