Graphviz node split

Okey so how to split node in graphviz in the middle to divide node in two parts with different colors and how to write text in multi line columns.

I know Graph viz is HTML based, but I can't make any workaround I need some examples.

I want to get something like this:

|------|
|Title |<-- red background
|------|
|text1 |
|text2 |<- green background
|______|

My example code looks like:

digraph G {
  node [shape=box] <- don't know how to make it divided Up/Down parts
  node1 {label = "Title"}
  node2 [label = "text1\\text2"]  <- Don't know what to do here 

  node1 -> node1 ;
  node1 -> node2 ;
}

Thanks in advance.

Answers


Most likely you want to use HTML-like-labels

digraph structs {
    node [shape=plaintext]
    struct [label=<
        <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
            <TR><TD PORT="title" bgcolor="red">Title</TD></TR>
            <TR><TD PORT="text" bgcolor="green">text1<br />text2</TD></TR>
        </TABLE>>];
    // example edge
    struct:title:w -> struct:text:s
}


Need Your Help

Store with encryption and access a lot of big data using ruby

ruby database encryption

Which options do I have if I need to store a lot of files or big data chunks with encryption, access them fast and have it all in one file? Something like Sqlite with encryption and optimized for big