Hi I'm creating a network diagrame of nodes using networkX's circular layout. It's been great laying out nodes in a circle however I want to add text to each node(a description) but the text must not overlap, so it remains readable something like this textwheel. Notice how all the text juts outward from each node. How can i do the same. I'm using pyqt/qt and I know of the painter.rotate method but I can't have a fixed rotation, what's the best way to workout the correct rotation for each node's description. I'm drawing the nodes on a Qgraphicsscene, so I can get the boundingRect of the scene, and also get the center of the scene. I can also get the position of each node as output by NetworkX's cirular layout. Having the 2 points is a start. I'm not sure what the best way forward after that is. If there are several articles that demonstrate a good solution please let me. One additional wrinkle is that the nodes themselves can be moved by the user. But I imagine that once I've worked out how to draw the text, i can apply the same formula/method in the event that the node itself is moved by the user. Just need a general way of working out the angle of the center of the node in relation to the center of the graphicssene. If there are code samples that can point me in the right direction please share.
Thanks