I'm a newbie with Graphviz, and I'm trying to draw a tree centered in an entity (I'm using the twopi
command).
overlap=true
it overlaps even if it has a lot of space aroud the overlapped labels.overlap=false
, labels become too small.How can I have the first situation without overlapping?
Complete code:
digraph g {
graph [ fontname = "Helvetica",
fontsize = 10,
size = "500,500",
splines=true,
overlap=false,
ratio=.5 ];
node [ shape = plaintext,
fontname = "Helvetica" ];
root="owl:Thing";
"owl:Thing" -> "Work";
"Work" -> "WrittenWork";
"Work" -> "Software";
"Work" -> "Website";
"Work" -> "Film";
"owl:Thing" -> "Agent";
"Agent" -> "Organisation";
"Organisation" -> "Non-ProfitOrganisation";
"Organisation" -> "GeopoliticalOrganisation";
"Organisation" -> "SambaSchool";
"Agent" -> "Person";
"Person" -> "Athlete";
"Person" -> "OfficeHolder";
"Person" -> "Astronaut";
"Person" -> "Philosopher";
"Person" -> "Architect";
"owl:Thing" -> "Drug";
"owl:Thing" -> "Place";
"Place" -> "SiteOfSpecialScientificInterest";
"Place" -> "PopulatedPlace";
"PopulatedPlace" -> "Country";
"PopulatedPlace" -> "Continent";
"PopulatedPlace" -> "Atoll";
"Place" -> "ProtectedArea";
"Place" -> "ArchitecturalStructure";
"Place" -> "HistoricPlace";
"Place" -> "NaturalPlace";
"NaturalPlace" -> "Mountain";
"NaturalPlace" -> "Volcano";
"NaturalPlace" -> "MountainRange";
}
Thank you,
Alessio
For this particular graph, you may use overlap=true
and then increment ranksep
until no labels overlap anymore. ranksep=1.3
seems to be a good value.
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