So, it seems one cannot do the following (it raises an error, since axes
does not have a set_linewidth
method):
axes_style = {\'lin
If you're recursively creating (non-rectangular) axes using pyplot, you can change the linewidth parameter for each ax.
For instance:
import matplotlib.pyplot as plt
plt.figure(figsize = figsize)
fig, ax = plt.subplots(figsize = figsize)
for shape in sf.shapeRecords():
x = [i[0] for i in shape.shape.points[:]]
y = [i[1] for i in shape.shape.points[:]]
ax.plot(x, y, 'k', linewidth=5)
For documentation, see MPL.axes documentation (Scroll down until "Other Parameters" -> **kwargs)
N.B. "If you make multiple lines with one plot command, the kwargs apply to all those lines."
Maybe this solution is related to a different question asked elsewhere, but I found this page looking for a solution to my own problem, so maybe it can help others looking for the same thing.