How to remove border box on arc charts when saving to png #2990
-
MWEimport pandas as pd
import altair as alt
source = pd.DataFrame({"category": [1, 2, 3, 4, 5, 6], "value": [4, 6, 10, 3, 7, 8]})
alt.Chart(source).mark_arc(stroke="black").encode(
theta=alt.Theta(field="value", type="quantitative"),
color=alt.Color(field="category", type="nominal"),
).save("arc.png", webdriver="firefox") QuestionIs there a way to get rid of the border box? It seems to be related to saving to png as the example linked above does not have it. It is present with and without |
Beta Was this translation helpful? Give feedback.
Answered by
joelostblom
Mar 24, 2023
Replies: 1 comment 3 replies
-
This section of the docs shows that https://altair-viz.github.io/user_guide/customization.html#removing-the-chart-border. Actually maybe we should update that to use |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
mcp292
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This section of the docs shows that https://altair-viz.github.io/user_guide/customization.html#removing-the-chart-border. Actually maybe we should update that to use
stroke=None
which might be more semantacally pleasing (but same effect asstrokeWith=0
.