Closed Javert899 closed 5 years ago
The possibility to set the horizontal layout on Petri net representations has been provided using the pn_vis_factory.RANKDIR_LR parameter, in the 'develop' branch.
The following example code could be used:
from pm4py.objects.log.importer.xes import factory as xes_importer from pm4py.algo.discovery.inductive import factory as inductive_miner from pm4py.visualization.petrinet import factory as pn_vis_factory
log = xes_importer.apply("C:\running-example.xes") net, im, fm = inductive_miner.apply(log) gviz = pn_vis_factory.apply(net, im, fm, parameters={pn_vis_factory.RANKDIR_LR: True}) pn_vis_factory.view(gviz)
As in title, expecially in publishing, it would be nice to have the option to output the Petri net in an horizontal way instead of vertical way.