how to remove the blue part?
import altair as alt
from vega_datasets import data
iris = data.iris()
alt.Chart(iris).mark_point().encode(
x='petalWidth',
y='petalLength',
color='species'
).configure_axis(
grid=False
).configure_view(
strokeWidth=0
)
I have spent a whole afternoon to find a proper syntax for removing it, there are too many parameters and I am totally confused. Thanks.
You can hide the axis by setting axis=None
in the associated encoding:
import altair as alt
from vega_datasets import data
iris = data.iris()
alt.Chart(iris).mark_point().encode(
x='petalWidth',
y=alt.Y('petalLength', axis=None),
color='species'
).configure_axis(
grid=False
).configure_view(
strokeWidth=0
)
If you want to hide just the ticks and domain line, you can set the ticks
and domain
axis properties to False
:
alt.Chart(iris).mark_point().encode(
x='petalWidth',
y=alt.Y('petalLength', axis=alt.Axis(ticks=False, domain=False)),
color='species'
).configure_axis(
grid=False
).configure_view(
strokeWidth=0
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With