#!/usr/bin/env python

from pyplot import *

class graph:
    def __init__(self, nome="piano cartesiano", minx=-1, maxx=20, miny=-1, maxy=20, dx=400, dy=400):
        sx=dx/(maxx-minx)
        sy=dy/(maxy-miny)
        self.p=Plot(nome, dx, dy, sx, sy)
        self.p.seto((-minx*sx, dy+miny*sy))
        self.p.setwidth(4)
        self.p.setcolor("black")
        self.p.axes()
    def plot(self, c, colore="black"):
        self.p.setcolor(colore)
        self.p.drawpoly((c,c))
    def line(self, s, colore="black"):
        self.p.setcolor(colore)
        self.p.drawpoly(s)
    def funz(self, f):
        self.p.xy(f)
    
p=graph()

#-funzioni
s='0+10*x-4.5*x*x'
v='10-9.8*x'
a='-9.8'

p.funz(s)