最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Point at every vertex Vega Altair markline - Stack Overflow

programmeradmin2浏览0评论

I am trying to create a multi line chart in vega altair, i want the vertex of the line to have a point , However my lines only have a point at the starting and not at all vertex .

base = alt.Chart(df).mark_line(
            point = {
                'size': 70,
                'filled': True,
            },
            interpolate = 'catmull-rom'
        ).encode(
        x = alt.X(f'{x_col}:O',
                title = None,
                axis = alt.Axis(
                    labelAngle = 0,
                    grid = False,
                    ticks = False,
                ),
                sort=alt.SortField(f'{sort}:t', order='descending')
                ),
        y = alt.Y(
                f'{y_col}:Q',
                axis = alt.Axis(
                    grid = False,
                    domain = False,
                    ticks = False,
                ),
                scale = alt.Scale(domain = [0, df[y_col].max()*1.25]),
                title = None
            ),
        color = f'{color}:N',
    ).configure_legend(
        labelFontSize=legendFontSize,
        orient = 'none',
        legendX = width - 15,
        legendY = 0,
        title=None,
        labelColor="black",
        symbolSize = 50,
        symbolType = 'stroke',
        clipHeight = 22,
        labelLimit = 300
    ).configure_view(
        stroke = 'transparent'
    ).properties(
            width = width,
            padding = {
                'top': 0,
                'right': 10,
                'bottom': 20,
                'left': 20,  
            }
    )

This is my code , i am tring to pass the point kwargs in dict , i have tried to pass only point = True, but it still has this issue , My vega altair version is 5.4.1.

发布评论

评论列表(0)

  1. 暂无评论