I am learning to program in Python for science and data analysis, and I am working with a mathematical model (Excel with macros) to observe environmental variables. The model generates compartment diagrams to represent the results, but I would like to take it to a Python script that produces cleaner diagrams for automated generation. However, I haven't found a way to generate compartment diagrams with a fixed structure like the one in the image. I am currently trying to use Mermaid markdown in Python, but the diagram ended up curving the arrows or I felt compelled to put boxes where there shouldn't be any. I also tried using libraries to modify diagrams from draw.io, but I couldn't get it to work. How can I generate this sort of diagram in Python? Continue reading...