holtzy / The-Python-Graph-Gallery

A website displaying hundreds of charts made with Python
https://www.python-graph-gallery.com
BSD Zero Clause License
1.88k stars 371 forks source link

Hierarchical Edge Bundling in Python #280

Closed XiyuanWu closed 2 weeks ago

XiyuanWu commented 8 months ago

I think it's possible to use Python to draw Hierarchical Edge Bundling. I have an example small chip of code:

def graph_chart():

    c.add(
        "",
        categories=category,
        nodes=nodes_list,
        links=links_list,
        layout="circular",
        is_rotate_label=True,
        linestyle_opts=opts.LineStyleOpts(color="source", curve=0.3)
            )
    c.set_global_opts(
        legend_opts=opts.LegendOpts(orient="vertical", pos_left="3%", pos_top="20%"),
        title_opts=opts.TitleOpts(title="星级推荐")
    )
    return c

Sample output:

image

Please ignore the non-english languages. I think this is a simple version for Hierarchical Edge Bundling. complete code in my repositories.

JosephBARBIERDARNAL commented 5 months ago

Hi @XiyuanWu ! Thanks for your suggestion, it looks very nice!

Can you provide links or examples of the complete code you're talking about? I can't find it

Thanks again!

XiyuanWu commented 5 months ago

The complete link is in here.

This whole project was about combining different kinds of graphs into an interactive dashboard, index.html file was also uploaded.

JosephBARBIERDARNAL commented 4 months ago

Hi @XiyuanWu ! I've had a look at the library you're using, and although it seems possible to make very nice graphs, the library's non-English documentation makes it IMO too complex to use and add to the gallery

@holtzy what do you think?

XiyuanWu commented 4 months ago

Hi,

I found this English Documentation Here In left columns, find Graph image There are 6 types of relationship graphs, and the last one is what we are talking about right now.

example: image link: here

XiyuanWu commented 4 months ago

And their GitHub page: here