☰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

min/max zoom

Community Support
Amir_El-hamdy
Amir_El-hamdy

Is there something I can implement to set a min/max zoom?
When zooming out on the plot, the points deviate from where they are supposed to be.

The best way I can think to mitigate this, is to simply prevent the user from zooming out too much.

Thanks in advance

⌁   Link to post
Sarah_Bird3
Sarah_Bird3

This doesn’t exist in Bokeh yet I’m afraid.

                    There

is an op en issue for it:

···

https://github.com/bokeh/bokeh/issues/572
On 11/12/15 5:18 PM, Amir El-hamdy
wrote:

    Is there something I can implement to set a min/max

zoom?
When zooming out on the plot, the points deviate from where
they are supposed to be.

      The best way I can think to mitigate this, is to simply

prevent the user from zooming out too much.

Thanks in advance

–

  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/5143244b-2eb5-447c-acad-0c104b82b068%40continuum.io?utm_medium=email&utm_source=footer)      .

For more options, visit .

https://groups.google.com/a/continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad-0c104b82b068%40continuum.io
https://groups.google.com/a/continuum.io/d/optout

⌁   Link to post
Amir_El-hamdy
Amir_El-hamdy

I don’t suppose there is any way to detect the current level of zoom on the plot?

···

On Friday, 13 November 2015 05:56:30 UTC, Sarah Bird wrote:

This doesn’t exist in Bokeh yet I’m afraid.

                    There

is an op en issue for it:
https://github.com/bokeh/bokeh/issues/572

  On 11/12/15 5:18 PM, Amir El-hamdy > wrote:
    Is there something I can implement to set a min/max

zoom?
When zooming out on the plot, the points deviate from where
they are supposed to be.

      The best way I can think to mitigate this, is to simply

prevent the user from zooming out too much.

Thanks in advance

–

  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+un...@continuum.io.

  To post to this group, send email to bo...@continuum.io.

  To view this discussion on the web visit [](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad-0c104b82b068%40continuum.io?utm_medium=email&utm_source=footer)[https://groups.google.com/a/continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad-0c104b82b068%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad-0c104b82b068%40continuum.io).

  For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
⌁   Link to post
Bryan
Bryan

Except for the new tile renderer, there is no notion of zoom "level" there is just whatever the current data range is, which can be arbitrarily set. If that's what you are asking about, then the ranges are on the plot's frame object, in coffeescript, something like:

  plot.get('frame').get('x_ranges')['default'] # default since possible to have multiple ranges

Bryan

···

On Nov 13, 2015, at 8:03 AM, Amir El-hamdy <amir.elhamdy@gmail.com> wrote:

I don't suppose there is any way to detect the current level of zoom on the plot?

On Friday, 13 November 2015 05:56:30 UTC, Sarah Bird wrote:
This doesn't exist in Bokeh yet I'm afraid.

There is an open issue for it: Support for pan/zoom range limits · Issue #572 · bokeh/bokeh · GitHub

On 11/12/15 5:18 PM, Amir El-hamdy wrote:

Is there something I can implement to set a min/max zoom?
When zooming out on the plot, the points deviate from where they are supposed to be.
The best way I can think to mitigate this, is to simply prevent the user from zooming out too much.

Thanks in advance
--
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+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad-0c104b82b068%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 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/326ec8ba-2717-4028-a9a3-bee4402e0ae5%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Yixin_Liu
Yixin_Liu

Hi Bryan,

I have a very naive question. We can use zoom tool to zoom in only, right? I cannot figure out how to do zoom out. Every time I need to zoom out, I first do a reset then zoom in.

Thanks,

Yixin

···

On Friday, November 13, 2015 at 8:32:01 AM UTC-8, Bryan Van de ven wrote:

Except for the new tile renderer, there is no notion of zoom “level” there is just whatever the current data range is, which can be arbitrarily set. If that’s what you are asking about, then the ranges are on the plot’s frame object, in coffeescript, something like:

    plot.get('frame').get('x_ranges')['default']  # default since possible to have multiple ranges

Bryan

On Nov 13, 2015, at 8:03 AM, Amir El-hamdy amir.e...@gmail.com wrote:

I don’t suppose there is any way to detect the current level of zoom on the plot?

On Friday, 13 November 2015 05:56:30 UTC, Sarah Bird wrote:

This doesn’t exist in Bokeh yet I’m afraid.

There is an open issue for it: https://github.com/bokeh/bokeh/issues/572

On 11/12/15 5:18 PM, Amir El-hamdy wrote:

Is there something I can implement to set a min/max zoom?

When zooming out on the plot, the points deviate from where they are supposed to be.

The best way I can think to mitigate this, is to simply prevent the user from zooming out too much.

Thanks in advance

–
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+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad-0c104b82b068%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 bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/326ec8ba-2717-4028-a9a3-bee4402e0ae5%40continuum.io.

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

⌁   Link to post
Sarah_Bird3
Sarah_Bird3

if you’re using
box_zoom, then yes, it only lets you see more detail

      if you're using wheel_            zoom,

then no, just scroll in the other direction to zoom out

···

On 11/13/15 10:49 AM, Yixin Liu wrote:

Hi Bryan,

    I have a very naive question. We can use zoom tool to zoom in

only, right? I cannot figure out how to do zoom out. Every time
I need to zoom out, I first do a reset then zoom in.

    Thanks,



    Yixin



    On Friday, November 13, 2015 at 8:32:01 AM UTC-8, Bryan Van de

ven wrote:

      Except

for the new tile renderer, there is no notion of zoom “level”
there is just whatever the current data range is, which can be
arbitrarily set. If that’s what you are asking about, then the
ranges are on the plot’s frame object, in coffeescript,
something like:

              plot.get('frame').get(          'x_ranges')['default']  #

default since possible to have multiple ranges

      Bryan





      > On Nov 13, 2015, at 8:03 AM, Amir El-hamdy <          >

wrote:

I don’t suppose there is any way to detect the current
level of zoom on the plot?
On Friday, 13 November 2015 05:56:30 UTC, Sarah Bird
wrote:
This doesn’t exist in Bokeh yet I’m afraid. > > There is an open issue for it: > > On 11/12/15 5:18 PM, Amir El-hamdy wrote:
Is there something I can implement to set a min/max
zoom?
When zooming out on the plot, the points deviate from
where they are supposed to be.
The best way I can think to mitigate this, is to
simply prevent the user from zooming out too much.

Thanks in advance
– >> 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 .
To post to this group, send email to .
To view this discussion on the web visit

–

  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/e5d873be-1597-4f64-8c4e-b107eb1f858b%40continuum.io?utm_medium=email&utm_source=footer)      .

For more options, visit .

amir.e...@gmail.com

https://github.com/bokeh/bokeh/issues/572

bokeh+un...@continuum.io
bo...@continuum.io
https://groups.google.com/a/continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad- 0c104b82b068%40continuum.io.

      >> For more options, visit [https://groups.google.com/a/continuum.io/d/optout](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 bokeh+un...@continuum.io .

      > To post to this group, send email to
      .

To view this discussion on the web visit bo...@continuum.io
https://groups.google.com/a/continuum.io/d/msgid/bokeh/326ec8ba-2717-4028-a9a3- bee4402e0ae5%40continuum.io.

      > For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout)          .

    [https://groups.google.com/a/continuum.io/d/msgid/bokeh/e5d873be-1597-4f64-8c4e-b107eb1f858b%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/e5d873be-1597-4f64-8c4e-b107eb1f858b%40continuum.io)

https://groups.google.com/a/continuum.io/d/optout

⌁   Link to post
Yixin_Liu
Yixin_Liu

I don’t like the wheelzoom tool which is too sensitive and it is very easily to zoom to nowhere. This feature is very annoying to me.
I like boxzoom and wish to have both zoom in and zoom out boxzoom tools. I believe it is more common to have these zoom pair than only have zoom in option.
As to the icon, let the boxzoom in tool icon have an “+” in its glass and boxzoom out tool icon have “-” sign in it.

···

On Friday, November 13, 2015 at 2:25:19 PM UTC-8, Sarah Bird wrote:

    if you're using

box_zoom, then yes, it only lets you see more detail

      if you're using wheel_            zoom,

then no, just scroll in the other direction to zoom out

On 11/13/15 10:49 AM, Yixin Liu wrote:

Hi Bryan,

    I have a very naive question. We can use zoom tool to zoom in

only, right? I cannot figure out how to do zoom out. Every time
I need to zoom out, I first do a reset then zoom in.

    Thanks,



    Yixin



    On Friday, November 13, 2015 at 8:32:01 AM UTC-8, Bryan Van de > > ven wrote:
      Except

for the new tile renderer, there is no notion of zoom “level”
there is just whatever the current data range is, which can be
arbitrarily set. If that’s what you are asking about, then the
ranges are on the plot’s frame object, in coffeescript,
something like:

              plot.get('frame').get(          'x_ranges')['default']  #

default since possible to have multiple ranges

      Bryan





      > On Nov 13, 2015, at 8:03 AM, Amir El-hamdy <amir.e...@gmail.com          > > > > wrote:


      >

      > I don't suppose there is any way to detect the current

level of zoom on the plot?

      >

      > On Friday, 13 November 2015 05:56:30 UTC, Sarah Bird > > > wrote:


      > This doesn't exist in Bokeh yet I'm afraid.

      >

      > There is an open issue for it: [https://github.com/bokeh/bokeh/issues/572](https://github.com/bokeh/bokeh/issues/572)


      >

      > On 11/12/15 5:18 PM, Amir El-hamdy wrote:


      >> Is there something I can implement to set a min/max

zoom?

      >> When zooming out on the plot, the points deviate from

where they are supposed to be.

      >> The best way I can think to mitigate this, is to

simply prevent the user from zooming out too much.

      >>

      >> Thanks in advance


      >> --

      >> 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+un...@continuum.io .

      >> To post to this group, send email to bo...@continuum.io          .


      >> To view this discussion on the web visit [](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad-0c104b82b068%40continuum.io)[https://groups.google.com/a/](https://groups.google.com/a/)continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad-          0c104b82b068%40continuum.io.


      >> For more options, visit [https://groups.google.com/a/continuum.io/d/optout](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 bokeh+un...@continuum.io .

      > To post to this group, send email to bo...@continuum.io          .


      > To view this discussion on the web visit [](https://groups.google.com/a/continuum.io/d/msgid/bokeh/326ec8ba-2717-4028-a9a3-bee4402e0ae5%40continuum.io)[https://groups.google.com/a/](https://groups.google.com/a/)continuum.io/d/msgid/bokeh/326ec8ba-2717-4028-a9a3-          bee4402e0ae5%40continuum.io.


      > For more options, visit [https://groups.google.com/a/continuum.io/d/optout](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 bokeh+un...@continuum.io.

  To post to this group, send email to bo...@continuum.io.

  To view this discussion on the web visit [](https://groups.google.com/a/continuum.io/d/msgid/bokeh/e5d873be-1597-4f64-8c4e-b107eb1f858b%40continuum.io?utm_medium=email&utm_source=footer)[https://groups.google.com/a/continuum.io/d/msgid/bokeh/e5d873be-1597-4f64-8c4e-b107eb1f858b%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/e5d873be-1597-4f64-8c4e-b107eb1f858b%40continuum.io).

  For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
⌁   Link to post
Bryan
Bryan

Yixin,

I was about to say that the sensitivity of the wheel zoom in configurable, but when I checked I see that the property is only exposed on the JS side unfortunately. If you know some JS you could definitely adjust the sensitivity by doing: myzoomtool.set('speed') to a new value.

It's also possible to have "centered" box zoom tools that permit zooming out (the drag action defines a half diagonal instead of a full diagonal, so the first mouse point is where the zoom is centered), but Bokeh does not have this at the moment.

Can you add two issues to the GH issue tracker? One to expose the wheel zoom speed in python, and another to add a "centered" mode to box zoom? Neither would be a huge amount of work.

Thanks,

Bryan

···

On Nov 13, 2015, at 6:02 PM, Yixin Liu <liuyxpp@gmail.com> wrote:

I don't like the wheelzoom tool which is too sensitive and it is very easily to zoom to nowhere. This feature is very annoying to me.
I like boxzoom and wish to have both zoom in and zoom out boxzoom tools. I believe it is more common to have these zoom pair than only have zoom in option.
As to the icon, let the boxzoom in tool icon have an "+" in its glass and boxzoom out tool icon have "-" sign in it.

On Friday, November 13, 2015 at 2:25:19 PM UTC-8, Sarah Bird wrote:
if you're using box_zoom, then yes, it only lets you see more detail
if you're using wheel_zoom, then no, just scroll in the other direction to zoom out

On 11/13/15 10:49 AM, Yixin Liu wrote:

Hi Bryan,

I have a very naive question. We can use zoom tool to zoom in only, right? I cannot figure out how to do zoom out. Every time I need to zoom out, I first do a reset then zoom in.

Thanks,

Yixin

On Friday, November 13, 2015 at 8:32:01 AM UTC-8, Bryan Van de ven wrote:
Except for the new tile renderer, there is no notion of zoom "level" there is just whatever the current data range is, which can be arbitrarily set. If that's what you are asking about, then the ranges are on the plot's frame object, in coffeescript, something like:

        plot.get('frame').get('x_ranges')['default'] # default since possible to have multiple ranges

Bryan

> On Nov 13, 2015, at 8:03 AM, Amir El-hamdy <amir.e...@gmail.com> wrote:
>
> I don't suppose there is any way to detect the current level of zoom on the plot?
>
> On Friday, 13 November 2015 05:56:30 UTC, Sarah Bird wrote:
> This doesn't exist in Bokeh yet I'm afraid.
>
> There is an open issue for it: Support for pan/zoom range limits · Issue #572 · bokeh/bokeh · GitHub
>
> On 11/12/15 5:18 PM, Amir El-hamdy wrote:
>> Is there something I can implement to set a min/max zoom?
>> When zooming out on the plot, the points deviate from where they are supposed to be.
>> The best way I can think to mitigate this, is to simply prevent the user from zooming out too much.
>>
>> Thanks in advance
>> --
>> 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+un...@continuum.io.
>> To post to this group, send email to bo...@continuum.io.
>> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5143244b-2eb5-447c-acad-0c104b82b068%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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/326ec8ba-2717-4028-a9a3-bee4402e0ae5%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 bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e5d873be-1597-4f64-8c4e-b107eb1f858b%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 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/fd42c807-0ca8-44ef-856f-9e798c2ec559%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