iPython notebook plantuml extension

前端 未结 2 1808
眼角桃花
眼角桃花 2021-02-01 11:15

How can we use plantuml UML tool in iPython notebook? It should helpful for us since UML figure is frequently used during paper work.

After some google from internet, I

2条回答
  •  悲&欢浪女
    2021-02-01 11:56

    There is a PlantUML cell magic package. Please refer to iPlantUML@PyPi

    After installation (pip install iplantuml) follow package introduction, you can create plantUML code in jupyterlab as follow:

    Import package first,

    import iplantuml
    

    use cell magic:

    %%plantuml 
    
    @startuml
    Alice -> Bob: Authentication Request
    Bob --> Alice: Authentication Response
    @enduml 
    

    then show a diagram in cell output as:

提交回复
热议问题