i'm trying to set the size of the nodes this way:
controller[shape=circle,width=.5,label="Controller",style=filled,fillcolor="#8EC13A"];
But all three nodes are with different size. How can i set fixed size?
The special node shapes Msquare, Mcircle, and Mdiamond are simply an ordinary square, circle and diamond with the diagonals style set. The rounded style causes the polygonal corners to be smoothed. Note that this style also applies to record-based nodes.
If you want to set the size manually use the minimum width and/or minimum height or set both at the same time using minimum size. The circle shapes just uses the greatest of both values, otherwise you may be interested in the ellipse shape. If you want to mark the node even smaller than it is in your question, set the inner sep value lower.
at node with circle shape is radius equal to minimum size/2, of course if you set inner sep to zero. node features can define local at node or as new style with tikzpicture options or globally with tikzset in preamble of a document. for example:
Node Shapes. There are three main types of shapes : polygon-based, record-based and user-defined. The record-based shape has largely been superseded and greatly generalized by HTML-like labels. That is, instead of using shape=record, one might consider using shape=none, margin=0 and an HTML-like label.
A circle node shape can be created by providing the option circle to the ode command. The following line code creates a circle node named (c) at the point with coordinates (0,0): Compiling this line of code displays nothing. The circle node will be drawn only if we provide draw option to the node command as follows:
From the DOT Guide http://www.graphviz.org/pdf/dotguide.pdf on page 4 it says the following:
When drawn, a node’s actual size is the greater of the requested size and the area needed for its text label, unless fixedsize=true, in which case the width and height values are enforced.
Thus you simply need to add fixedsize=true to your code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With