Specify only inner_width and inner_height

I want to show an 1280 * 720 png image on my canvas with toolbars (crosshair, hover, …) and xy-coordinates without any distortion. At first, I create a figure with plot_width=1280 and plot_height=720, but it is distorted because of coordinates and toolbars occupying some pixels. Then, I try to explicitly specify inner_width and inner_height, but they are read-only properties (for bokeh 1.0.2). How can I do it? For now, the only way is to throw bokeh into rubbish bin and use matplotlib.

Hi,

I want to show an 1280 * 720 png image on my canvas with toolbars (crosshair, hover, …) and xy-coordinates without any distortion. At first, I create a figure with plot_width=1280 and plot_height=720, but it is distorted because of coordinates and toolbars occupying some pixels. Then, I try to explicitly specify inner_width and inner_height, but they are read-only properties (for bokeh 1.0.2). How can I do it? For now, the only way is to throw bokeh into rubbish bin and use matplotlib.

currently this isn’t possible (at least without gross hacks). Fixed sizing and aspect management of plot frame is implemented and will be available in bokeh 1.1 (possibly next release).

Mateusz

···

On Sun, Dec 16, 2018 at 11:25 PM Jianfei Gao [email protected] wrote:

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/5b0b70bb-7290-47d7-ac84-e5d176cf9127%40continuum.io.

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

Hi,

I agree with what Mateusz has said but for the sake of completeness, here is what you can do right now:

* control the overall canvas width/height with plot_width and plot_height
* control the minimum padding around the inner from with min_border, min_border_left, etc.
* control the extent of axis ticks by controlling their rotation, formatting, or location

So, if you control the ticks (and account for the colorbar size), and set appropriate min_border values that will not be exceeded, you can effectively exert control over the frame dimensions indirectly. I note that this is far from ideal, and look forward to the layout PR arriving.

Thanks,

Bryan

···

On Dec 17, 2018, at 07:16, Mateusz Paprocki <[email protected]> wrote:

Hi,
On Sun, Dec 16, 2018 at 11:25 PM Jianfei Gao <[email protected]> wrote:
I want to show an 1280 * 720 png image on my canvas with toolbars (crosshair, hover, ...) and xy-coordinates without any distortion. At first, I create a figure with plot_width=1280 and plot_height=720, but it is distorted because of coordinates and toolbars occupying some pixels. Then, I try to explicitly specify inner_width and inner_height, but they are read-only properties (for bokeh 1.0.2). How can I do it? For now, the only way is to throw bokeh into rubbish bin and use matplotlib.

currently this isn't possible (at least without gross hacks). Fixed sizing and aspect management of plot frame is implemented and will be available in bokeh 1.1 (possibly next release).

Mateusz

--
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/5b0b70bb-7290-47d7-ac84-e5d176cf9127%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/CANFzp8gY7_ndGRu2mjZUoXXADQxHokQ15o-5-JOVSNVRZ8Y_gg%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.