PYTHON Tutorial
()plt.title
لإضافة عنوان للمخطط.()plt.xlabel
و()plt.ylabel
لوسم محوري x و y على التوالي.()plt.legend
لإنشاء تسمية توضيحية لعناصر المخطط.plt.plot(..., color='red', linestyle='--', marker='o')
لتخصيص لون الخط ونوعه وعلامتهimport matplotlib.pyplot as plt
# إنشاء بيانات الرسم البياني
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
# تخصيص الرسم البياني
plt.plot(x, y, color='blue', linestyle='-', marker='o')
plt.title('مخطط التبعثر')
plt.xlabel('المحور السيني')
plt.ylabel('المحور الصادي')
plt.legend(['بيانات'])
# عرض الرسم البياني
plt.show()