Reputation: 435
I am overwhelmed by the customization options I have in Python. Is there a way to modify the x-axes to or add a x-axes at y=0 like in the Excel example? If not, is there a way to add an emphasized grid line?
Here are the python plot with x-axes at y=-0.10:
and the excel plot with x-axes at y=0:
The plot command is currently simply
plot = plt.plot(diff)
ax = plt.axes()
ax.grid(True)
plt.show()
where diff
stores the data be plotted.
Upvotes: 1
Views: 66
Reputation: 58885
You can use the set_position()
method of the Spine
class:
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
ax.spines['bottom'].set_position(('data', 0))
Upvotes: 1