Issue
How could I add the lines in axis to highlight the ticks? This is the examples: https://i.stack.imgur.com/wwOtm.png
Solution
You can use the length
and width
parameters in ax.tick_params
like
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0,10,10)
y = x
fig, ax = plt.subplots()
ax.plot(x, y)
ax.tick_params(direction='in', length=10, width=3, color='r')
Additional info here https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.tick_params.html
Answered By - Alessandro Peca
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.