Giter Club home page Giter Club logo

Comments (8)

jrfonseca avatar jrfonseca commented on June 2, 2024 1

It sounds like #96 might go some way to address this.

That said, I feel we're wandering outside the remit of xdot.py. I accepted printing because it was "easy". If it turns out it's not that easy, then I rather not burdern xdot.py with printing. xdot.py was meant for visualization. If folks want to convert dot to something else, they should just use Graphviz tools directly. xdot.py is not meant to be an UI for Graphviz tools. Just an interactive visualizer.

from xdot.py.

Mome avatar Mome commented on June 2, 2024

Can you please give some more detail on how you got to this output, so one can reproduce it?

from xdot.py.

yurivict avatar yurivict commented on June 2, 2024

This DOT is clipped slightly when printed:

graph {
    rankdir=LR;
    a -- { b c d }; b -- { c e }; c -- { e f }; d -- { f g }; e -- h;
    f -- { h i j g }; g -- k; h -- { o l }; i -- { l m j }; j -- { m n k };
    k -- { n r }; l -- { o m }; m -- { o p n }; n -- { q r };
    o -- { s p }; p -- { s t q }; q -- { t r }; r -- t; s -- z; t -- z;
    { rank=same; b, c, d }
    { rank=same; e, f, g }
    { rank=same; h, i, j, k }
    { rank=same; l, m, n }
    { rank=same; o, p, q, r }
    { rank=same; s, t }
}                                                                                                                                                                                           

image

from xdot.py.

yurivict avatar yurivict commented on June 2, 2024

crazy.gv.txt example prints like this:

image

from xdot.py.

yurivict avatar yurivict commented on June 2, 2024

IMO, for large graphs xdot should offer the user to choose how many pages to split it into in X/Y directions.
But it should never just clip graphs.

from xdot.py.

Mome avatar Mome commented on June 2, 2024

OK, you used "print to file". Yes, I can confirm this looks really bad, and for me it also clips the graph the other way around.

In case you want to use another export feature, I added one in #96. However the pdf export will not stick to a paper page format.

from xdot.py.

yurivict avatar yurivict commented on June 2, 2024

I press the Print button and then save as PDF.

from xdot.py.

yurivict avatar yurivict commented on June 2, 2024

Alternatively you can just fix the pdf writer to center the drawing properly in the page.

from xdot.py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.