tags:

views:

62

answers:

1

Python: How to export Sympy image to png?

Who has any idea with this?

A: 

Use the saveimage method:

import sympy
x, y, z = sympy.symbols('xyz')
p = sympy.Plot(x * y ** 3 - y * x ** 3)
p.saveimage('/tmp/plot.png', format='png')
unutbu
Can we save to a buffer or a memory object?