সম্পাদনা
import matplotlib.pyplot as plt from matplotlib.collections import LineCollection figure, axes = plt.subplots() segments = [ [(1, 1), (2, 3)], [(2, 3), (3, 2)], [(3, 2), (4, 5)] ] collection = LineCollection( segments ) axes.add_collection(collection) axes.set_xlim(0, 5) axes.set_ylim(0, 6) plt.show()
পূর্বরূপ