Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverse the direction of arrows in xdot.py graphs without modifying the dot input #34

Closed
lkartik opened this issue Jun 29, 2016 · 1 comment

Comments

@lkartik
Copy link

lkartik commented Jun 29, 2016

Hi,
I am trying to reverse the arrows in th edges of my graph. Say I have directed graph a-> b, b->c in graphviz dot format. But, I want the xdot.py to draw the graphs(with arrow head and tail reversed,) as b->a and c->b. Perhaps, it should be possible by modifying the vector graphics drawing functions(LINE_CAP_BUTT/LINE_JOIN_MITER). I was trying to modify the cairo functions(cr.*) in many classes by exchanging the x and y , src and dst. But, could not get it done It would be really helpful for me if anyone could point me the function/show how to do it. Any help would be much appreciated.

@jrfonseca
Copy link
Owner

What you're trying to do is beyond the xdot.py's scope of being a viewer.

Furthermore, I don't think it's technically possible. xdot output doesn't express things in terms of "arrow heads", but rather polygons.

In short, if you want to revert the output, pre-process the dot graph input, not the xdot output or xdot.py itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants