shahinrostami / plotapi

Engaging visualisations, made easy.
https://plotapi.com
MIT License
267 stars 17 forks source link

Keeping the partitions (the names that you specify and their colour blocks) the same size even if there is no connections between them #43

Closed JA-Jones closed 3 years ago

JA-Jones commented 3 years ago

Hi Shahin,

I recently bought Chord Pro and have started to draw some basic chord diagrams. However, I couldn't find any documentation linked to my below question;

I want to make a chord diagram with 12 sections (in the case of the example this would be the 'names' variable)

Of the 12 sections only a number of them are actually interrelated. I want equidistant portions (the circle cut into 12 sections, 12 different colours) equally spaced apart. I then want to have the connections visualised across the sections that have connections, leaving blank spaces (meaning no connections) between the sections that are not related.

When I specify no connections with a section it simply removes the section. There is one particular section that is well connected and this seems to enlarge the section greatly. Is there anyway of keeping the section sizes the same? (the circular rings around the outside I mean by this).

I hope I have conveyed my question appropriately. For example, I want something like the diagram on page 7 of the PDF that comes when you buy the Pro version. This has equidistant sections, but I want some sections to have no connections and some to have many etc.

Look forward to hearing from you. Cheers, Jolyon.

shahinrostami commented 3 years ago

Hi @JA-Jones

I hope you and yours are well!

You can achieve what you're after with the coloured_diagonals=False argument 👍

I've just created an additional section for you here. Previously, coloured_diagonals=False would still let you hover over the "invisible" connections and display the hover box, but I've removed that just now. The output being:

Screenshot 2021-06-19 at 10 42 02

It takes a little extra work with the matrix (see the example), but I hope this helps you achieve what you're after :)

If I get more time to work on this project, I will look into adding a flag that does the matrix updates for you!

Looking forward to hearing back from you!

JA-Jones commented 3 years ago

Hi Shahin, I can't thank you enough for responding so quickly! It is very much appreciated. I've had a look, and it seems that the colored_diagonals code worked a charm. Thanks again. kind regards, Jolyon.

shahinrostami commented 3 years ago

It's my pleasure :)

All the best!