selcuk egese
selcuk egese

Reputation: 49

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 - - -

Upvotes: 1

Views: 160

Answers (1)

vladsiv
vladsiv

Reputation: 2936

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)))

Upvotes: 1

Related Questions