should not explicitly define the backend for matplotlib

also add get_segments() in Line2D class since matplotlib has a
LineCollection that takes in segments to draw colored lines.