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

Is it possible to change the size of the output image? #12

Open
Mockapapella opened this issue Jul 16, 2019 · 2 comments
Open

Is it possible to change the size of the output image? #12

Mockapapella opened this issue Jul 16, 2019 · 2 comments

Comments

@Mockapapella
Copy link

The graph that I created output an image of size 32767x3822 pixels. The words however are still blurry even when zoomed in all the way. I tried looking through the files to see if I could find something relating to output size but couldn't find anything.

@daneads
Copy link
Owner

daneads commented Jul 16, 2019

Graphviz provides the size option to specify the maximum size of the output, so that could be implemented in the graphviz output script. You'll notice a few attributes such as --font-name are set via command line arguments to graphviz. On my "to-do" list is allowing the user to easily specify arbitrary arguments for graphviz such as the size attribute.

In the meantime, I would recommend outputting to a .dot file instead of a .png file. Call pycallgraph2 from within your script and specify the output type within the the GraphVizOutput:

graphviz = GraphvizOutput()
graphviz.output_type = 'dot'
graphviz.output_file = 'pycallgraph.dot'

with PyCallGraph(output=graphviz):
    #  code_to_profile()

Then call dot on that file with your preferred ratio and/or size. Here is a good guide with details on page 12.

@martinsmid
Copy link

I would suggest to use a dot viewer, such as xdot on linux. Besides avoiding the problems with large raster images, it also might support some searching, hightlighting, navigating through the hierarchy, etc.

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

No branches or pull requests

3 participants