Shaded area between two lines

I was having trouble figuring out from reading the docs. Suppose I have two lines, and I want to shade the area between the two. Is there a function or attribute to do that?

It looks like maybe use Figure.patch (http://bokeh.pydata.org/en/0.9.3/docs/reference/plotting.html#bokeh.plotting.Figure.patch) with line properties. The documentation is kind of lacking on how to do that though.

The intended result is something like this:

Hi Jeff,

Something like this probably ought to be built into Bokeh itself as a convenience (could you open a GitHub feature request issue?), but in the mean time you can see an example similar to your link here:

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

Thanks,

Bryan

···

On Dec 18, 2015, at 3:15 PM, [email protected] wrote:

I was having trouble figuring out from reading the docs. Suppose I have two lines, and I want to shade the area between the two. Is there a function or attribute to do that?

It looks like maybe use Figure.patch (http://bokeh.pydata.org/en/0.9.3/docs/reference/plotting.html#bokeh.plotting.Figure.patch) with line properties. The documentation is kind of lacking on how to do that though.

The intended result is something like this:
http://blogs.mathworks.com/images/pick/jiro/potw_shadederrorbar/potw_shadederrorbar_03.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/eef903aa-3ab1-4e9a-b6e0-0db63bf6c0f7%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Is there a way to change scale when two graphs are linked, like the linked-panning example, but at a different effective magnification? For the example at page
http://bokeh.pydata.org/en/0.10.0/docs/quickstart.html

this modification doesn’t work:

magnification = 10
x_range=magnification * s1.x_range

···

On Tue, Dec 29, 2015 at 1:29 PM, Bryan Van de Ven [email protected] wrote:

Hi Jeff,

Something like this probably ought to be built into Bokeh itself as a convenience (could you open a GitHub feature request issue?), but in the mean time you can see an example similar to your link here:

    [https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/bollinger.py](https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/bollinger.py)

Thanks,

Bryan

On Dec 18, 2015, at 3:15 PM, [email protected] wrote:

I was having trouble figuring out from reading the docs. Suppose I have two lines, and I want to shade the area between the two. Is there a function or attribute to do that?

It looks like maybe use Figure.patch (http://bokeh.pydata.org/en/0.9.3/docs/reference/plotting.html#bokeh.plotting.Figure.patch) with line properties. The documentation is kind of lacking on how to do that though.

The intended result is something like this:

http://blogs.mathworks.com/images/pick/jiro/potw_shadederrorbar/potw_shadederrorbar_03.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/eef903aa-3ab1-4e9a-b6e0-0db63bf6c0f7%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/CFD4DEF7-41A6-4C62-8C1A-873470345278%40continuum.io.

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

David P. Saroff
Rochester Institute of Technology
54 Lomb Memorial Dr, Rochester, NY 14623
[email protected] | (434) 227-6242

David,

That is not built in to Bokeh, but it would be trivial to accomplish with a CustomJS callback on the range of one plot, that updates the range however you like, on the other plot. It would take one line of JavaScript or so. You can read more about this sort of thing (and see a similar example) here:

  http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#customjs-for-range-update

Thanks

Bryan

···

On Dec 29, 2015, at 12:52 PM, DAVID SAROFF (RIT Student) <[email protected]> wrote:

Is there a way to change scale when two graphs are linked, like the linked-panning example, but at a different effective magnification? For the example at page
http://bokeh.pydata.org/en/0.10.0/docs/quickstart.html

this modification doesn't work:

magnification = 10
x_range=magnification * s1.x_range

On Tue, Dec 29, 2015 at 1:29 PM, Bryan Van de Ven <[email protected]> wrote:

Hi Jeff,

Something like this probably ought to be built into Bokeh itself as a convenience (could you open a GitHub feature request issue?), but in the mean time you can see an example similar to your link here:

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

Thanks,

Bryan

> On Dec 18, 2015, at 3:15 PM, [email protected] wrote:
>
> I was having trouble figuring out from reading the docs. Suppose I have two lines, and I want to shade the area between the two. Is there a function or attribute to do that?
>
> It looks like maybe use Figure.patch (http://bokeh.pydata.org/en/0.9.3/docs/reference/plotting.html#bokeh.plotting.Figure.patch) with line properties. The documentation is kind of lacking on how to do that though.
>
> The intended result is something like this:
> http://blogs.mathworks.com/images/pick/jiro/potw_shadederrorbar/potw_shadederrorbar_03.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/eef903aa-3ab1-4e9a-b6e0-0db63bf6c0f7%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/CFD4DEF7-41A6-4C62-8C1A-873470345278%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
David P. Saroff
Rochester Institute of Technology
54 Lomb Memorial Dr, Rochester, NY 14623
[email protected] | (434) 227-6242

--
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/CABMftcSNzJTectP1Pu8Gh%3DgYhxBwQ0nsDLWuEAOYs9KB0mQSpw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Bryan,

The example is what I want for my data exploration, thanks!

Wheel zoom works nicely. Box zoom is a bit weird when the aspect ratio is not one.

···

On Tue, Dec 29, 2015 at 9:04 PM, Bryan Van de Ven [email protected] wrote:

David,

That is not built in to Bokeh, but it would be trivial to accomplish with a CustomJS callback on the range of one plot, that updates the range however you like, on the other plot. It would take one line of JavaScript or so. You can read more about this sort of thing (and see a similar example) here:

    [http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#customjs-for-range-update](http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#customjs-for-range-update)

Thanks

Bryan

On Dec 29, 2015, at 12:52 PM, DAVID SAROFF (RIT Student) [email protected] wrote:

Is there a way to change scale when two graphs are linked, like the linked-panning example, but at a different effective magnification? For the example at page

http://bokeh.pydata.org/en/0.10.0/docs/quickstart.html

this modification doesn’t work:

magnification = 10

x_range=magnification * s1.x_range

On Tue, Dec 29, 2015 at 1:29 PM, Bryan Van de Ven [email protected] wrote:

Hi Jeff,

Something like this probably ought to be built into Bokeh itself as a convenience (could you open a GitHub feature request issue?), but in the mean time you can see an example similar to your link here:

    [https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/bollinger.py](https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/bollinger.py)

Thanks,

Bryan

On Dec 18, 2015, at 3:15 PM, [email protected] wrote:

I was having trouble figuring out from reading the docs. Suppose I have two lines, and I want to shade the area between the two. Is there a function or attribute to do that?

It looks like maybe use Figure.patch (http://bokeh.pydata.org/en/0.9.3/docs/reference/plotting.html#bokeh.plotting.Figure.patch) with line properties. The documentation is kind of lacking on how to do that though.

The intended result is something like this:

http://blogs.mathworks.com/images/pick/jiro/potw_shadederrorbar/potw_shadederrorbar_03.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/eef903aa-3ab1-4e9a-b6e0-0db63bf6c0f7%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/CFD4DEF7-41A6-4C62-8C1A-873470345278%40continuum.io.

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

David P. Saroff

Rochester Institute of Technology

54 Lomb Memorial Dr, Rochester, NY 14623

[email protected] | (434) 227-6242

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

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/50B26E0C-808F-46FB-91E7-6FC9CD6A5C0E%40continuum.io.

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

David P. Saroff
Rochester Institute of Technology
54 Lomb Memorial Dr, Rochester, NY 14623
[email protected] | (434) 227-6242

Georg,

Improving out on-canvas layout (to support more sub-componenets on canvas, fixed aspect ratios, etc.) is a high priority after 0.11

Thanks,

Bryan

···

On Dec 30, 2015, at 7:12 AM, DAVID SAROFF (RIT Student) <[email protected]> wrote:

Bryan,

The example is what I want for my data exploration, thanks!

Wheel zoom works nicely. Box zoom is a bit weird when the aspect ratio is not one.

On Tue, Dec 29, 2015 at 9:04 PM, Bryan Van de Ven <[email protected]> wrote:
David,

That is not built in to Bokeh, but it would be trivial to accomplish with a CustomJS callback on the range of one plot, that updates the range however you like, on the other plot. It would take one line of JavaScript or so. You can read more about this sort of thing (and see a similar example) here:

        http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#customjs-for-range-update

Thanks

Bryan

> On Dec 29, 2015, at 12:52 PM, DAVID SAROFF (RIT Student) <[email protected]> wrote:
>
> Is there a way to change scale when two graphs are linked, like the linked-panning example, but at a different effective magnification? For the example at page
> http://bokeh.pydata.org/en/0.10.0/docs/quickstart.html
>
> this modification doesn't work:
>
> magnification = 10
> x_range=magnification * s1.x_range
>
> On Tue, Dec 29, 2015 at 1:29 PM, Bryan Van de Ven <[email protected]> wrote:
>
> Hi Jeff,
>
> Something like this probably ought to be built into Bokeh itself as a convenience (could you open a GitHub feature request issue?), but in the mean time you can see an example similar to your link here:
>
> https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/bollinger.py
>
> Thanks,
>
> Bryan
>
> > On Dec 18, 2015, at 3:15 PM, [email protected] wrote:
> >
> > I was having trouble figuring out from reading the docs. Suppose I have two lines, and I want to shade the area between the two. Is there a function or attribute to do that?
> >
> > It looks like maybe use Figure.patch (http://bokeh.pydata.org/en/0.9.3/docs/reference/plotting.html#bokeh.plotting.Figure.patch) with line properties. The documentation is kind of lacking on how to do that though.
> >
> > The intended result is something like this:
> > http://blogs.mathworks.com/images/pick/jiro/potw_shadederrorbar/potw_shadederrorbar_03.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/eef903aa-3ab1-4e9a-b6e0-0db63bf6c0f7%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/CFD4DEF7-41A6-4C62-8C1A-873470345278%40continuum.io.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout.
>
>
>
> --
> David P. Saroff
> Rochester Institute of Technology
> 54 Lomb Memorial Dr, Rochester, NY 14623
> [email protected] | (434) 227-6242
>
>
> --
> 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/CABMftcSNzJTectP1Pu8Gh%3DgYhxBwQ0nsDLWuEAOYs9KB0mQSpw%40mail.gmail.com.
> 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/50B26E0C-808F-46FB-91E7-6FC9CD6A5C0E%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
David P. Saroff
Rochester Institute of Technology
54 Lomb Memorial Dr, Rochester, NY 14623
[email protected] | (434) 227-6242

--
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/CABMftcSxmrf8bLD-rwSDd9FCxpQR4Kam%2B60U3Sh65y7RFhWSqg%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.