Hidden axes no longer hidden with 0.5.2

Hi,

Previously, the below statements would hide my axes lines and ticks, but now with the new 0.5.2, they aren’t hidden.

axis().axis_line_color = None

xaxis().major_label_text_color = None

axis().major_tick_line_color = None

Is there a new way to hide them?

Thanks very much!

Armen

Armen,

Very sorry, introduced a change in 0.5.2 that broke xaxis() and yaxis(). I am going to push a fix with a test this morning, and we will get a new release or replacement of some sort out soon. In the mean time, if you can replace the functions in bokeh/plotting.py with these you should be good to go.

def xaxis():
    """ Get the current axis objects

    Returns:
        Returns axis object or splattable list of axis objects on the current plot
    """
    p = curplot()
    if p is None:
        return None
    axis = [obj for obj in p.above + p.below if isinstance(obj, Axis)]
    return _list_attr_splat(axis)

def yaxis():
    """ Get the current `y` axis object(s)

    Returns:
        Returns y-axis object or splattable list of y-axis objects on the current plot
    """
    p = curplot()
    if p is None:
        return None
    axis = [obj for obj in p.left + p.right if isinstance(obj, Axis)]
    return _list_attr_splat(axis)

Bryan

···

On Aug 16, 2014, at 1:11 AM, Armen Alexanian <[email protected]> wrote:

Hi,

Previously, the below statements would hide my axes lines and ticks, but now with the new 0.5.2, they aren't hidden.

axis().axis_line_color = None
xaxis().major_label_text_color = None
axis().major_tick_line_color = None

Is there a new way to hide them?

Thanks very much!
Armen

--
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/3cfe2860-0cf4-4791-8196-61927e60dee9%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thanks so much Bryan! I really appreciate your help!

···

On Aug 16, 2014 6:48 AM, “Bryan Van de Ven” [email protected] wrote:

Armen,

Very sorry, introduced a change in 0.5.2 that broke xaxis() and yaxis(). I am going to push a fix with a test this morning, and we will get a new release or replacement of some sort out soon. In the mean time, if you can replace the functions in bokeh/plotting.py with these you should be good to go.

def xaxis():

""" Get the current axis objects



Returns:

    Returns axis object or splattable list of axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.above + p.below if isinstance(obj, Axis)]

return _list_attr_splat(axis)

def yaxis():

""" Get the current `y` axis object(s)



Returns:

    Returns y-axis object or splattable list of y-axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.left + p.right if isinstance(obj, Axis)]

return _list_attr_splat(axis)

Bryan

On Aug 16, 2014, at 1:11 AM, Armen Alexanian [email protected] wrote:

Hi,

Previously, the below statements would hide my axes lines and ticks, but now with the new 0.5.2, they aren’t hidden.

axis().axis_line_color = None

xaxis().major_label_text_color = None

axis().major_tick_line_color = None

Is there a new way to hide them?

Thanks very much!

Armen

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/3cfe2860-0cf4-4791-8196-61927e60dee9%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/DC7139F3-8A7C-4F41-B103-B64D01A87F60%40continuum.io.

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

There is a devel build available if you want to try…

Cheers.

Damián.

···

On Sat, Aug 16, 2014 at 12:29 PM, Armen Alexanian [email protected] wrote:

Thanks so much Bryan! I really appreciate your help!

On Aug 16, 2014 6:48 AM, “Bryan Van de Ven” [email protected] wrote:

Armen,

Very sorry, introduced a change in 0.5.2 that broke xaxis() and yaxis(). I am going to push a fix with a test this morning, and we will get a new release or replacement of some sort out soon. In the mean time, if you can replace the functions in bokeh/plotting.py with these you should be good to go.

def xaxis():

""" Get the current axis objects



Returns:

    Returns axis object or splattable list of axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.above + p.below if isinstance(obj, Axis)]

return _list_attr_splat(axis)

def yaxis():

""" Get the current `y` axis object(s)



Returns:

    Returns y-axis object or splattable list of y-axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.left + p.right if isinstance(obj, Axis)]

return _list_attr_splat(axis)

Bryan

On Aug 16, 2014, at 1:11 AM, Armen Alexanian [email protected] wrote:

Hi,

Previously, the below statements would hide my axes lines and ticks, but now with the new 0.5.2, they aren’t hidden.

axis().axis_line_color = None

xaxis().major_label_text_color = None

axis().major_tick_line_color = None

Is there a new way to hide them?

Thanks very much!

Armen

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/3cfe2860-0cf4-4791-8196-61927e60dee9%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/DC7139F3-8A7C-4F41-B103-B64D01A87F60%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/CALLGW%3Dw0A2FCJJa2FNW0ovsXtwLaLOqhqietCb0spYZRc%2BxO7Q%40mail.gmail.com.

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

Thanks!! Dynamite!

···

On Sat, Aug 16, 2014 at 12:29 PM, Armen Alexanian [email protected] wrote:

Thanks so much Bryan! I really appreciate your help!

On Aug 16, 2014 6:48 AM, “Bryan Van de Ven” [email protected] wrote:

Armen,

Very sorry, introduced a change in 0.5.2 that broke xaxis() and yaxis(). I am going to push a fix with a test this morning, and we will get a new release or replacement of some sort out soon. In the mean time, if you can replace the functions in bokeh/plotting.py with these you should be good to go.

def xaxis():

""" Get the current axis objects



Returns:

    Returns axis object or splattable list of axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.above + p.below if isinstance(obj, Axis)]

return _list_attr_splat(axis)

def yaxis():

""" Get the current `y` axis object(s)



Returns:

    Returns y-axis object or splattable list of y-axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.left + p.right if isinstance(obj, Axis)]

return _list_attr_splat(axis)

Bryan

On Aug 16, 2014, at 1:11 AM, Armen Alexanian [email protected] wrote:

Hi,

Previously, the below statements would hide my axes lines and ticks, but now with the new 0.5.2, they aren’t hidden.

axis().axis_line_color = None

xaxis().major_label_text_color = None

axis().major_tick_line_color = None

Is there a new way to hide them?

Thanks very much!

Armen

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/3cfe2860-0cf4-4791-8196-61927e60dee9%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/DC7139F3-8A7C-4F41-B103-B64D01A87F60%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/CALLGW%3Dw0A2FCJJa2FNW0ovsXtwLaLOqhqietCb0spYZRc%2BxO7Q%40mail.gmail.com.

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

This worked! Thanks very much Bryan and Damián!

···

On Saturday, August 16, 2014 3:07:11 PM UTC-7, Damian Avila wrote:

There is a devel build available if you want to try…

Cheers.

Damián.

On Sat, Aug 16, 2014 at 12:29 PM, Armen Alexanian [email protected] wrote:

Thanks so much Bryan! I really appreciate your help!

On Aug 16, 2014 6:48 AM, “Bryan Van de Ven” [email protected] wrote:

Armen,

Very sorry, introduced a change in 0.5.2 that broke xaxis() and yaxis(). I am going to push a fix with a test this morning, and we will get a new release or replacement of some sort out soon. In the mean time, if you can replace the functions in bokeh/plotting.py with these you should be good to go.

def xaxis():

""" Get the current axis objects



Returns:

    Returns axis object or splattable list of axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.above + p.below if isinstance(obj, Axis)]

return _list_attr_splat(axis)

def yaxis():

""" Get the current `y` axis object(s)



Returns:

    Returns y-axis object or splattable list of y-axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.left + p.right if isinstance(obj, Axis)]

return _list_attr_splat(axis)

Bryan

On Aug 16, 2014, at 1:11 AM, Armen Alexanian [email protected] wrote:

Hi,

Previously, the below statements would hide my axes lines and ticks, but now with the new 0.5.2, they aren’t hidden.

axis().axis_line_color = None

xaxis().major_label_text_color = None

axis().major_tick_line_color = None

Is there a new way to hide them?

Thanks very much!

Armen

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/3cfe2860-0cf4-4791-8196-61927e60dee9%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/DC7139F3-8A7C-4F41-B103-B64D01A87F60%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/CALLGW%3Dw0A2FCJJa2FNW0ovsXtwLaLOqhqietCb0spYZRc%2BxO7Q%40mail.gmail.com.

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

this appears to be happening again in 0.6.1

xaxis().major_tick_line_color=None

produces no effect (nor when switched to colors vs None)

however:

axis().axis_line_color=None

does work, so think my code is right.

···

On Sunday, August 17, 2014 7:43:32 PM UTC-4, Armen Alexanian wrote:

This worked! Thanks very much Bryan and Damián!

On Saturday, August 16, 2014 3:07:11 PM UTC-7, Damian Avila wrote:

There is a devel build available if you want to try…

Cheers.

Damián.

On Sat, Aug 16, 2014 at 12:29 PM, Armen Alexanian [email protected] wrote:

Thanks so much Bryan! I really appreciate your help!

On Aug 16, 2014 6:48 AM, “Bryan Van de Ven” [email protected] wrote:

Armen,

Very sorry, introduced a change in 0.5.2 that broke xaxis() and yaxis(). I am going to push a fix with a test this morning, and we will get a new release or replacement of some sort out soon. In the mean time, if you can replace the functions in bokeh/plotting.py with these you should be good to go.

def xaxis():

""" Get the current axis objects



Returns:

    Returns axis object or splattable list of axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.above + p.below if isinstance(obj, Axis)]

return _list_attr_splat(axis)

def yaxis():

""" Get the current `y` axis object(s)



Returns:

    Returns y-axis object or splattable list of y-axis objects on the current plot

"""

p = curplot()

if p is None:

    return None

axis = [obj for obj in p.left + p.right if isinstance(obj, Axis)]

return _list_attr_splat(axis)

Bryan

On Aug 16, 2014, at 1:11 AM, Armen Alexanian [email protected] wrote:

Hi,

Previously, the below statements would hide my axes lines and ticks, but now with the new 0.5.2, they aren’t hidden.

axis().axis_line_color = None

xaxis().major_label_text_color = None

axis().major_tick_line_color = None

Is there a new way to hide them?

Thanks very much!

Armen

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/3cfe2860-0cf4-4791-8196-61927e60dee9%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/DC7139F3-8A7C-4F41-B103-B64D01A87F60%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/CALLGW%3Dw0A2FCJJa2FNW0ovsXtwLaLOqhqietCb0spYZRc%2BxO7Q%40mail.gmail.com.

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

Hey Henry,

I did a a little experimentation on master, and I think I might know what is happening. There is no code to remove minor ticks that happen to coincide with major ticks. It's maybe a reasonable thing to do, or at least provide an option for. But try this: set major_tick_line_color to "red" or something, you will probably see a red bit of a major tick sticking out behind a small minor tick. And then if you set it to None, it's actually just the minor tick that remains. This is the behaviour I observed on master, anyway.

Unfortunately, none of the minor tick properties are exposed on the python side! This is an easy fix, and an oversight, I will submit a PR today, and it should be in the next dev build and the 0.7 release next month.

Bryan

···

On Oct 29, 2014, at 7:09 PM, [email protected] wrote:

this appears to be happening again in 0.6.1

xaxis().major_tick_line_color=None

produces no effect (nor when switched to colors vs None)

however:
axis().axis_line_color=None

does work, so think my code is right.

BTW, if you want an immediate solution you can try adding these lines to the "Axis" class in bokeh/objects.py:

    minor_tick_props = Include(LineProps)
    minor_tick_in = Int
    minor_tick_out = Int

And then you ought to be able to style minor ticks as well. I just tried setting both major and minor tick colors to None and saw no ticks at all, as expected. Here is the PR, also:

  https://github.com/bokeh/bokeh/pull/1361

Bryan

···

On Oct 30, 2014, at 11:19 AM, Bryan Van de Ven <[email protected]> wrote:

On Oct 29, 2014, at 7:09 PM, [email protected] wrote:

this appears to be happening again in 0.6.1

xaxis().major_tick_line_color=None

produces no effect (nor when switched to colors vs None)

however:
axis().axis_line_color=None

does work, so think my code is right.

Hey Henry,

I did a a little experimentation on master, and I think I might know what is happening. There is no code to remove minor ticks that happen to coincide with major ticks. It's maybe a reasonable thing to do, or at least provide an option for. But try this: set major_tick_line_color to "red" or something, you will probably see a red bit of a major tick sticking out behind a small minor tick. And then if you set it to None, it's actually just the minor tick that remains. This is the behaviour I observed on master, anyway.

Unfortunately, none of the minor tick properties are exposed on the python side! This is an easy fix, and an oversight, I will submit a PR today, and it should be in the next dev build and the 0.7 release next month.

Bryan