Use the setter methods of a Line2D
instance. plot
returns a list of Line2D
objects; e.g., line1, line2 = plot(x1, y1, x2, y2)
. In the code below we will suppose that we have only one line so that the list returned is of length 1. We use tuple unpacking with line,
to get the first element of that list:
line, = plt.plot(x, y, '-')
line.set_antialiased(False) # turn off antialiasing
here are the availiable Line2d properties
Property | Value Type |
---|---|
alpha | float |
animated | [True | False] |
antialiased or aa | [True | False] |
clip_box | a matplotlib.transform.Bbox instance |
clip_on | [True | False] |
clip_path | a Path instance and a Transform instance, a Patch |
color or c | any |