Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Punkty charakterystyczne
- points_x = [10, 20, 30, 40]
- points_y = fuzzy_comfort(np.array(points_x))
- labels = ['a (10°C)', 'b (20°C)', 'c (30°C)', 'd (40°C)']
- # Rysowanie wykresu
- plt.figure(figsize=(10, 5))
- plt.plot(x, mu_comfort, label='Temperatura komfortowa', color='green')
- plt.scatter(points_x, points_y, color='black', zorder=5)
- # Etykiety
- for i, label in enumerate(labels):
- plt.annotate(label, (points_x[i], points_y[i] + 0.05), ha='center')
- plt.title('Funkcja przynależności: Temperatura komfortowa (trapez: 10, 20, 30, 40)')
- plt.xlabel('Temperatura [°C]')
- plt.ylabel('Przynależność')
- plt.grid(True)
- plt.legend()
- plt.ylim(0, 1.1)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement