Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi! You can find more details about pyplot here: x0.no/5yi3

You can try adding two lines to your code to get the axis intersected at (0,0), like this.

import matplotlib.pyplot as plt
plt.plot([1, 3, 2, 4])
plt.axhline(y=0)
plt.axvline(x=0)
plt.savefig('1.png')

Maybe creating the plots using functions from sage might be easier than using matplotlib.

Hi! You can find more details about pyplot here: x0.no/5yi3

You can try adding two lines to your code to get the axis intersected at (0,0), like this.

import matplotlib.pyplot as plt
plt.plot([1, 3, 2, 4])
plt.axhline(y=0)
plt.axvline(x=0)
plt.savefig('1.png')

Maybe creating the plots using functions from sage might be easier than using matplotlib.

Hi! You can find more details about pyplot here: x0.no/5yi3

You can try adding two lines to your code to get the axis intersected at (0,0), like this.

import matplotlib.pyplot as plt
plt.plot([1, 3, 2, 4])
plt.axhline(y=0)
plt.axvline(x=0)
plt.savefig('1.png')

This produces: image description

The original plot was:

image description

Maybe creating the plots using functions from sage might be easier than using matplotlib.

Edit: Added images to illustrate difference and updated link.