Files
percettroni/grafico.py

27 lines
704 B
Python

import matplotlib.pyplot as plt
import numpy as np
""" class Grafico:
def __init__(self):
self.x = np.linspace(-10, 10, 100) #Variazione di X per disegnare la retta penso
plt.title('AND Logico')
plt.xlabel('X1')
plt.ylabel('X2')
plt.xlim(0, 2)
plt.ylim(0, 2)
def disegna_and(self):
plt.plot(0, 0, 'o', color='red', markeredgewidth=10)
plt.plot(0, 1, 'o', color='red',markeredgewidth=10)
plt.plot(1, 0, 'o', color='red',markeredgewidth=10)
plt.plot(1, 1, 'o', color='green',markeredgewidth=10)
def mostra(self):
plt.show()
grafico = Grafico()
grafico.disegna_and()
grafico.mostra() """