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

Using a symlog scale? #1077

Closed
mattpitkin opened this issue Aug 9, 2018 · 8 comments
Closed

Using a symlog scale? #1077

mattpitkin opened this issue Aug 9, 2018 · 8 comments

Comments

@mattpitkin
Copy link

Is there any way to use a symlog scale for axes in Altair. If not would it be possible/relatively simple to add this in the future?

@jakevdp
Copy link
Collaborator

jakevdp commented Aug 9, 2018

I don't think this is supported in Vega-Lite. It might be worth doing a feature request there.

@mattpitkin
Copy link
Author

@jakevdp - thanks. I'll do as you suggest and see if there's the possibility of adding this to Vega-Lite.

@willwhitney
Copy link

This appears to be supported now in Vega-Lite (see https://vega.github.io/vega-lite/docs/scale.html#symlog).

@jakevdp
Copy link
Collaborator

jakevdp commented Mar 1, 2019

The current docs on the Vega-Lite website are for the version 3.0 pre-release. Once Vega-Lite 3 is released we will work to update altair to incorporate new features like this one.

@willwhitney
Copy link

willwhitney commented Mar 1, 2019 via email

@mattpitkin
Copy link
Author

Now that vega-lite v3 has been released has the symlog support been incorporated into Altair?

@jakevdp
Copy link
Collaborator

jakevdp commented Nov 27, 2019

Yes, for example:

import altair as alt
import pandas as pd

df = pd.DataFrame({
    'x': range(-50, 50),
    'y': range(100),
})

alt.Chart(df).mark_line().encode(
    alt.X('x', scale=alt.Scale(type='symlog')),
    alt.Y('y')
)

visualization (31)

@jakevdp jakevdp closed this as completed Nov 27, 2019
@mattpitkin
Copy link
Author

Excellent, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants