简体   繁体   中英

Increasing the spacing between plotting texts in matplotlib

Hi is there a way I could increase the spacing between the lines for the function:

plt.axhline(-100, color = 'purple', linewidth =1.4, linestyle='--')

The output gives the lines on the graph that looks like ---

However my intended output is - - -

You could specify dashed line styles by providing a dash tuple (offset, (on_off_seq)) :

Example:

ax.axhline(threshold, color="red", lw=2, alpha=0.7, linestyle=(0, (5, 10)))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM