[Ipe-discuss] working with a graph of nodes

Otfried Cheong otfried at ipe.airpost.net
Thu Aug 1 16:39:50 CEST 2019


Most Ipe users make graph nodes by creating a group object,  consisting of the box (drawn in Ipe, e.g. as a circle or as a rectangle) and the label (a text object).  Press "Shift+C" to align the centers of the two objects, then "G" to group them into a single object.

You can still edit the label of the node by using "Edit text in group" from the context menu.   This works best if one creates the text objects with alignment at the center.

You may want to try out the new "move graph nodes" mode of Ipe - it lets you rearrange the graph nodes while the graph edges follow automatically.


If you are Tikz user, you may prefer to let tikz draw your graph nodes.   You can do that, for instance, by adding the style sheet "tikz-shapes.isy" (in the Ipe distribution).   Create a text object (a label, not a paragraph), and in the first pulldown box select "green-disk".   The text object will then be drawn as a tikz-generated box.

The disadvantage of this method is that the boundary of the tikz-generated box cannot be snapped to.  So you would draw your edges to the center of the node, and let tikz draw the node on top of the edges.

Feel free to ask here if something is unclear.   This is not really documented anywhere yet.   I hope to get around to doing that at some point.

Cheers,
  Otfried


On Mon, Jul 22, 2019, at 16:00, David Chemouil via Ipe-discuss wrote:
> Hi
> 
> having known Ipe for ages, I just start to use it seriously. Thanks for the good
> work!
> 
> My main drawing activity (to illustrate scientific articles I co-author) is
> drawing graphs of nodes and edges. A long time, basic user of Tikz (where it's
> easy), I don't really see if there is a systematic way to create a Label (in Ipe
> parlance) with some padding (i.e internal margin), or with a minimum size, or
> with a circular box (like a bounding box) around with a minimum diameter. 
> 
> Similarly, I noticed that the small green dotted box around labels cannot be
> used (or so I think) with boundary snapping (combined, or not, with angular
> snapping). This would be useful to draw several edges going out of or into a
> node, even more if the first requirement from above (rectangular box with
> padding, or circular box) is achievable.
> 
> Finally, can/should all this be specified in a stylesheet dedicated to graphs?
> 
> To make my questions more precise, let me say that it more or less coressponds
> to Tikz attributes like `minimum width`, `inner sep` or anchors like `north
> east`...
> 
> Thanks,
> 
> dc


More information about the Ipe-discuss mailing list