Bokeh: How to change extra axis visibility

Taking this here from Stack Overflow:

up votedown votefavorite

I know I can turn axes on and off in bokeh with p1.xaxis.visible = None or p1.yaxis.visible = None from Hide Axis in Bokeh. What if I have an extra y range I want to change the visibility of? I’ve defined my extra axis like this:

plot.extra_y_ranges = {'ORP': Range1d(start=0, end=plot_d['y_axis2_max'])}
plot.add_layout(LinearAxis(y_range_name='ORP', axis_label='ORP, mV'), 'left')

I tried plot.extra_y_ranges.visible = None but it has no effect, and I wasn’t able to find anything in the documentation. Have I missed something?

Thanks all for your advice!

Try this:

extra_axis = LinearAxis(y_range_name='ORP', axis_label='ORP, mV')
plot.extra_y_ranges = {'ORP': Range1d(start=0, end=plot_d['y_axis2_max'])}
plot.add_layout(extra_axis, 'left')
extra_axis.visible = None

···

On 7/31/16 11:44 AM, wrote:

[email protected]

Taking this here from Stack
Overflow
:

up votedown votefavorite

                  I know I

can turn axes on and off in bokeh with p1.xaxis.visible = None or p1.yaxis.visible = None from Hide
Axis in Bokeh
. What if I have an extra y
range I want to change the visibility of? I’ve
defined my extra axis like this:

plot.extra_y_ranges = {'ORP': Range1d(start=0, end=plot_d['y_axis2_max'])}
plot.add_layout(LinearAxis(y_range_name='ORP', axis_label='ORP, mV'), 'left')

I tried plot.extra_y_ranges.visible = None but
it has no effect, and I wasn’t able to find
anything in the documentation. Have I missed
something?

Thanks all for your advice!

  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/8120d8c8-443f-45bd-8eff-f65c321218b5%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/8120d8c8-443f-45bd-8eff-f65c321218b5%40continuum.io?utm_medium=email&utm_source=footer).

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


Sarah Bird
Developer, Bokeh

    [
      ![Continuum Analytics](http://docs.continuum.io/_static/img/ContinuumWordmark.png)
    ](http://continuum.io)

Hi

Thank you- this helped no end, however these may be a problem with it. If you have say 3 axes and you make the middle one invisible then a gap is left between the remaining two. Is it possible to make it so that they move up to close up the gap?

···

On Thursday, August 4, 2016 at 3:09:19 PM UTC+2, Sarah Bird wrote:

Try this:

extra_axis = LinearAxis(y_range_name='ORP', axis_label='ORP, mV')
plot.extra_y_ranges = {'ORP': Range1d(start=0, end=plot_d['y_axis2_max'])}
plot.add_layout(extra_axis, 'left')
extra_axis.visible = None

On 7/31/16 11:44 AM, [email protected] > wrote:

Taking this here from Stack
Overflow
:

up votedown votefavorite

                  I know I

can turn axes on and off in bokeh with p1.xaxis.visible = None or p1.yaxis.visible = None from Hide
Axis in Bokeh
. What if I have an extra y
range I want to change the visibility of? I’ve
defined my extra axis like this:

plot.extra_y_ranges = {'ORP': Range1d(start=0, end=plot_d['y_axis2_max'])}
plot.add_layout(LinearAxis(y_range_name='ORP', axis_label='ORP, mV'), 'left')

I tried plot.extra_y_ranges.visible = None but
it has no effect, and I wasn’t able to find
anything in the documentation. Have I missed
something?

Thanks all for your advice!

  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/8120d8c8-443f-45bd-8eff-f65c321218b5%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/8120d8c8-443f-45bd-8eff-f65c321218b5%40continuum.io?utm_medium=email&utm_source=footer).

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


Sarah Bird
Developer, Bokeh

    [
      <img alt="Continuum Analytics" src="https://lh6.googleusercontent.com/proxy/VYgVjggTk1hCXSN9wFkffE3I6kxTvJ51tT4KvDXOuKbs1WyFG66k7kt2-vkDimbyxfWtP-d1paJmstMYhPPnDYSUF4rLPoYM2GM2QFM=w5000-h5000" height="30px" width="150px">
    ](http://continuum.io)