জয়েন লগইন

ম্যাটপ্লটলিব legend

🌈ম্যাটপ্লটলিব legend কি?

📋ম্যাটপ্লটলিব legend হলো গ্রাফের লেজেন্ড প্রদর্শন করার পদ্ধতি।

⚒️ম্যাটপ্লটলিব legend গ্রাফের লেজেন্ড প্রদর্শন করতে ব্যবহৃত হয়।

ম্যাটপ্লটলিব legend গ্রাফের লেজেন্ড প্রদর্শন করার উদাহরণ।

matplotlib
import matplotlib.pyplot as plt

figure, axes = plt.subplots()

axes.plot(
    [1, 2, 3],
    [2, 4, 6],
    label="Python"
)

axes.plot(
    [1, 2, 3],
    [3, 5, 7],
    label="PHP"
)

axes.legend()

plt.show()