python - Linestyle in matplotlib step function -
is possible set linestyle in matplotlib step function dashed, dotted, etc.?
i've tried:
step(x, linestyle='--'), step(x, '--') but did not help.
as of mpl 1.3.0 fixed upstream
you have come @ bit sideways step seems ignore linestyle. if @ step doing underneath, thin wrapper plot.
you can want talking plot directly:
import matplotlib.pyplot plt plt.plot(range(5), range(5), linestyle='--', drawstyle='steps') plt.plot(range(5), range(5)[::-1], linestyle=':', drawstyle='steps') plt.xlim([-1, 5]) plt.ylim([-1, 5]) 
['steps', 'steps-pre', 'steps-mid', 'steps-post'] valid values drawstyle , control step drawn.
pull request resulting question, think bug. [edit: has been pulled master , should show in v1.3.0].
Comments
Post a Comment