0

I want to reproduce this kind of graph by using tikz : Example graph

I already made a Tikz picture with just the colored nodes and edges but I haven’t found a way to draw the shape that fits nicely around the nodes, the edge and the edge’s cost. Can somebody direct me towards achieving basically exactly this ? I would also need to possible make other such regions fit around more than 2 nodes and 1 edge.

  • 2
    Welcome. Q27171 and the linked ones there should cover a lot of examples to do something like that. – Qrrbrbirlbel Aug 17 '23 at 20:45
  • That indeed helps a lot. I just found the topic at the same time as this comment. I guess there’s no incredibly easy way to do it and I’ll have to think a little bit. Thanks ! – maitrehihois Aug 17 '23 at 20:54
  • 2
    Show us, what you try so far! – Zarko Aug 17 '23 at 23:12
  • 1
    I've upvoted this because I think it's mean to downvote new users, but if you post the code you've got in a form people can copy-paste-compile, you're much more likely to get help and much less likely to get downvotes. It's easy to put a node behind which is big enough to include all the nodes. But it is much harder to create a closely-fitting path which does the same. Depending on how the diagram is constructed, it may be easier or harder. (E.g. it can be somewhat automated for forest trees.) – cfr Aug 18 '23 at 04:08
  • @maitrehihois, please add your code to your question. Thank you – MS-SPO Aug 18 '23 at 11:03

0 Answers0