Issue
Below are my codes of how am plotting my charts:
fig, axs = plt.subplots(2, 1)
np.cumsum(returns[['low', 'med','high']]).plot(ax=axs[0])
sig.plot(ax=axs[1])
plt.show()
The output of the 2nd subplot is what I want to change
I just want 0 and 1 and no values in between.
I tried adding the below after sig.plot(ax=axs[1])
axs[1].xticks(np.arange(0, 2, 1))
But that didn't work.
Solution
I think you want Y ticks: axs[1].set_yticks(np.arange(0, 2, 1))
Answered By - mozway
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.