Recommendation for drawing graphs and creating tables, saving as PDF
Martin Di Paola
martinp.dipaola at gmail.com
Fri Jun 11 22:32:28 EDT 2021
You could try https://plantuml.com and http://ditaa.sourceforge.net/.
Plantuml may not sound as the right tool but it is quite flexible and
after a few tweak you can create a block diagram as you shown.
And the good thing is that you *write* which elements and relations are
in your diagram and it is Plantuml which will draw it for you.
On the other hand, in Ditaa you have to do the layout but contrary to
most of the GUI apps, Ditaa processes plaintext (ascii art if you want).
For simple things, Ditaa is probably a good option too.
Finally, I use https://pandoc.org/ to transform my markdowns into PDFs
for a textbook that I'm writing (and in the short term for my blog).
None of those are "libraries" in the sense that you can load in Python,
however nothing should prevent you to call them from Python with
`subprocess`.
By the way, I'm interesting too in to know other tools for making
diagrams.
On Fri, Jun 11, 2021 at 08:52:20AM -0400, Neal Becker wrote:
>Jan Erik Moström wrote:
>
>> I'm doing something that I've never done before and need some advise for
>> suitable libraries.
>>
>> I want to
>>
>> a) create diagrams similar to this one
>> https://www.dropbox.com/s/kyh7rxbcogvecs1/graph.png?dl=0 (but with more
>> nodes) and save them as PDFs or some format that can easily be converted
>> to PDFs
>>
>> b) generate documents that contains text, lists, and tables with some
>> styling. Here my idea was to save the info as markdown and create PDFs
>> from those files, but if there is some other tools that gives me better
>> control over the tables I'm interested in knowing about them.
>>
>> I looked around around but could only find two types of libraries for a)
>> libraries for creating histograms, bar charts, etc, b) very basic
>> drawing tools that requires me to figure out the layout etc. I would
>> prefer a library that would allow me to state "connect A to B", "connect
>> C to B", "connect B to D", and the library would do the whole layout.
>>
>> The closest I've found it to use markdown and mermaid or graphviz but
>> ... PDFs (perhaps I should just forget about PDFs, then it should be
>> enough to send people to a web page)
>>
>> (and yes, I could obviously use LaTeX ...)
>>
>> = jem
>
>Like this?
>https://pypi.org/project/blockdiag/
>
>--
>https://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list