Mathedu Courses logo

Mathedu Courses

If you see this, something is wrong

Table of contents

First published on Saturday, Aug 22, 2026 and last modified on Tuesday, Sep 1, 2026

Lecture 0 - Get an Editable Window for a Figure in Python

Fabienne Chaplais Email

1 Lecture 0

from numpy import *
from matplotlib.pyplot import *
#definition of functions
x=arange(-10,11,0.1)
y0=0*x
y1=x
y2=-x
y3=(2/3)*x-(4/5)
y4=-(2/3)*x+(4/5)
#Draw Straight Lines
plot(x,y0,label='y=0')
plot(x,y1,label='y=x')
plot(x,y2,label='y=-x')
plot(x,y3,label='y=(2/3)*x-(4/5)')
plot(x,y4,label='y=-(2/3)*x+(4/5)')
plot(y0,x,label='x=0')
legend()
xlim(-15,15)
ylim(-15,15)
grid()
title('Straight Lines')

Discussion: login to participate.