How to draw a simple undirected graph in plantuml?

0 votes
asked Feb 15 in Question / help by khrosofdsfov (160 points)

https://imgur.com/a/q693amn

Like this I mean. (I'm studying graph theory in algorithms)

2 Answers

0 votes
answered Feb 15 by The-Lu (85,440 points)
selected Feb 16 by khrosofdsfov
 
Best answer

Hello K.,

Here is a proposal:

@startuml
() a
() b
() c
() d

a -> b
a --> c
b --> c
c -> d
@enduml

Regards,
Th.

commented Feb 16 by khrosofdsfov (160 points)
Thanks a lot, this means a lot to me.
0 votes
answered Feb 16 by The-Lu (85,440 points)

Hello

Here is another proposal:

@startuml
left to right direction
() a
() b
() c
() d

a --> b
a -r-> c
b -u-> c
c --> d

b -r[hidden]-> d
@enduml

Enjoy,
Regards,
Th.

...