pythx
pythx

Reputation: 38

How should I increase the resolution of an image outputted by SymPy?

I'm currently using the preview function of SymPy, with viewer set to "file". The link below should lead to an image that I made through SymPy.

My code:

from sympy.printing.preview import preview
preview(content, viewer="file", filename=filename)

Is there a way to increase the resolution of the image, or make it sharper?

Upvotes: 1

Views: 726

Answers (1)

audiomason
audiomason

Reputation: 2433

You can set the DPI in the dvioptions argument.

preview(content, viewer="file", filename=filename, dvioptions=['-D','1200'])

Upvotes: 1

Related Questions