This PR comes to fix some obvious issues with the #graph method, in the least intrusive way possible,
Issue 1: Graph too small
The graph size too small for wide or tall trees - see #29
This is caused since they decided to set a size of "9,11" as the default for some reason, instead of letting dot do its thing naturally.
Fixed by providing an empty size to the DotGraphPrinter
Issue 2: Graphr dependency error
Since the graphr gem is not in the dependency list, a non friendly error was thrown when it was not found.
Fixed by rescuing LoadError and printing a friendly error message to STDERR
Issue 3: ID in node labels
The node labels included the object ID, which was necessary to distinguish between nodes, but not necessary for viewing.
Fixed by providing an alternative node_labeler proc to the DotGraphPrinter
Issue 4: Empty quotes in discrete labels
In discrete cases, the label included empty '' - for example, January ''. Not sure what it was there for, so I changed it (without changing how it behaves on continuous properties).
This PR comes to fix some obvious issues with the
#graph
method, in the least intrusive way possible,Issue 1: Graph too small
The graph size too small for wide or tall trees - see #29 This is caused since they decided to set a size of "9,11" as the default for some reason, instead of letting dot do its thing naturally.
Fixed by providing an empty size to the
DotGraphPrinter
Issue 2: Graphr dependency error
Since the
graphr
gem is not in the dependency list, a non friendly error was thrown when it was not found.Fixed by rescuing
LoadError
and printing a friendly error message toSTDERR
Issue 3: ID in node labels
The node labels included the object ID, which was necessary to distinguish between nodes, but not necessary for viewing.
Fixed by providing an alternative
node_labeler
proc to theDotGraphPrinter
Issue 4: Empty quotes in discrete labels
In discrete cases, the label included empty
''
- for example,January ''
. Not sure what it was there for, so I changed it (without changing how it behaves on continuous properties).