Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gridlines not removed when setting tickMinStep #2329

Closed
morberg opened this issue Oct 30, 2020 · 2 comments
Closed

Gridlines not removed when setting tickMinStep #2329

morberg opened this issue Oct 30, 2020 · 2 comments
Labels
vega: vega-lite Requires upstream action in `vega-lite`

Comments

@morberg
Copy link
Contributor

morberg commented Oct 30, 2020

(I originally made a comment on the closed issue #1655, but it is probably better to handle this as a separate issue.)

When setting tickMinStep in Altair 4.1.0 the gridlines remain although the ticks are no longer shown. Is this a bug? I would expect the gridlines to disappear as well as shown in #1655 (comment) .

import altair as alt
import pandas as pd

df = pd.DataFrame({
    'x': range(5),
    'y': range(5)
})

alt.Chart(df).mark_point().encode(
    alt.X('x', axis=alt.Axis(tickMinStep=1.0)),
    alt.Y('y')
)

image

@morberg morberg changed the title Gridlines not removed when setting ticksMinStep Gridlines not removed when setting tickMinStep Oct 30, 2020
@jakevdp
Copy link
Collaborator

jakevdp commented Oct 30, 2020

It looks like grid lines don't respond to tickMinStep. This may be a Vega-Lite bug – I'd suggest inquiring there.

To work around it, you can specify tickCount, e.g.

import altair as alt
import pandas as pd

df = pd.DataFrame({
    'x': range(5),
    'y': range(5)
})

alt.Chart(df).mark_point().encode(
    alt.X('x', axis=alt.Axis(tickMinStep=1.0, tickCount=4)),
    alt.Y('y')
)

visualization - 2020-10-30T071302 875

@joelostblom joelostblom added the vega: vega-lite Requires upstream action in `vega-lite` label Feb 23, 2021
@joelostblom
Copy link
Contributor

It seems like this was fixed in VL, but has since then become an issue again. The progress can be followed in vega/vega-lite#9034. I'm closing this since there is nothing altair can do to fix this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vega: vega-lite Requires upstream action in `vega-lite`
Projects
None yet
Development

No branches or pull requests

3 participants