[R] stopping map from going out of bounds

how do i tell rBokeh that panning and zooming out etc shouldn’t go beyond the min, max x and y values. There should be a boundary of the graph and you should always be inside this boundary.

This is probably more of a bokeh question than rbokeh. I suppose something like this could be done with custom JS callbacks for zoom and pan actions. We will soon expose JS callback capability in rbokeh, but I don’t know if we would want to incorporate something high-level like this as a default behavior.

···

On Jul 25, 2015, at 7:48 PM, MySchizo Buddy [email protected] wrote:

how do i tell rBokeh that panning and zooming out etc shouldn’t go beyond the min, max x and y values. There should be a boundary of the graph and you should always be inside this boundary.

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/3510d009-2b48-4955-88f3-db2b390cb873%40continuum.io.

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

I think data boundaries is something that is either being actively worked on, or is on the very near-term roadmap.

···

On Fri, Jul 31, 2015 at 10:47 PM, Ryan Hafen [email protected] wrote:

This is probably more of a bokeh question than rbokeh. I suppose something like this could be done with custom JS callbacks for zoom and pan actions. We will soon expose JS callback capability in rbokeh, but I don’t know if we would want to incorporate something high-level like this as a default behavior.

On Jul 25, 2015, at 7:48 PM, MySchizo Buddy [email protected] wrote:

how do i tell rBokeh that panning and zooming out etc shouldn’t go beyond the min, max x and y values. There should be a boundary of the graph and you should always be inside this boundary.

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/3510d009-2b48-4955-88f3-db2b390cb873%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/A6A83F22-9609-4B71-AD27-9504E1684EB7%40gmail.com.

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

I have a branch locally for range limits. I have not pushed it to a PR yet, but maybe it would benefit from some review, and maybe it's enough to start with for now. I will try to make the PR this weekend. The basic complication is what to do when you have multiple ranges (for twin axes, e.g). It's easy enough to simply not do a range update if any of the ranges would end up out of bounds. It's more thorny if what you want is to do a range update, but snap to the range bound, if a range would end up out of bounds (what if more than one range would go out? Now it's a weird optimization problem to choose what the right range bound is...)

Bryan

···

On Jul 31, 2015, at 10:47 PM, Ryan Hafen <[email protected]> wrote:

This is probably more of a bokeh question than rbokeh. I suppose something like this could be done with custom JS callbacks for zoom and pan actions. We will soon expose JS callback capability in rbokeh, but I don’t know if we would want to incorporate something high-level like this as a default behavior.

On Jul 25, 2015, at 7:48 PM, MySchizo Buddy <[email protected]> wrote:

how do i tell rBokeh that panning and zooming out etc shouldn't go beyond the min, max x and y values. There should be a boundary of the graph and you should always be inside this boundary.

--
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/3510d009-2b48-4955-88f3-db2b390cb873%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/A6A83F22-9609-4B71-AD27-9504E1684EB7%40gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

I’d definitely like to see range limits as well-supported option in the short term, and as the default behavior in the long term. Just about the first thing that happens whenever I mouse around with Bokeh plots is that the data gets uncentered and often totally disappears, and it doesn’t even usually come back after pressing reset (which only seems to reset some of the properties to the original values, not every aspect of the plot). The result is very unsatisfying visually, which discourages interacting with the plots because it leaves everything in an awkward state.

For range boundaries, it seems like there are two reasonable behaviors – by default, snap to the largest range covered by any data on an axis, but it would also be nice to be able to turn on snapping to the smallest range covered by any data. I.e., I think the default should be to show all the data available, but in some cases people will want to show only the range where full data is available for everything. Anything else seems safely left to custom user coding.

For zooming, I’d also like to see limits in the other direction, so that zooming in stops at some value, but that’s much trickier – there’s not necessarily any well defined limit across all plots, except perhaps when only one actual data point is now visible. Not sure what to do about that aspect by default, but at least if there were limits in the zooming-out direction it would be easier to recover the plot to a good state (which is very fiddly right now).

Jim

···

On Sat, Aug 1, 2015 at 4:53 AM, Bryan Van de Ven [email protected] wrote:

I have a branch locally for range limits. I have not pushed it to a PR yet, but maybe it would benefit from some review, and maybe it’s enough to start with for now. I will try to make the PR this weekend. The basic complication is what to do when you have multiple ranges (for twin axes, e.g). It’s easy enough to simply not do a range update if any of the ranges would end up out of bounds. It’s more thorny if what you want is to do a range update, but snap to the range bound, if a range would end up out of bounds (what if more than one range would go out? Now it’s a weird optimization problem to choose what the right range bound is…)

Bryan

On Jul 31, 2015, at 10:47 PM, Ryan Hafen [email protected] wrote:

This is probably more of a bokeh question than rbokeh. I suppose something like this could be done with custom JS callbacks for zoom and pan actions. We will soon expose JS callback capability in rbokeh, but I don’t know if we would want to incorporate something high-level like this as a default behavior.

On Jul 25, 2015, at 7:48 PM, MySchizo Buddy [email protected] wrote:

how do i tell rBokeh that panning and zooming out etc shouldn’t go beyond the min, max x and y values. There should be a boundary of the graph and you should always be inside this boundary.

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/3510d009-2b48-4955-88f3-db2b390cb873%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/A6A83F22-9609-4B71-AD27-9504E1684EB7%40gmail.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/C007F621-853C-4BA4-BDDB-2BC4D939F9DD%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.