0

How can I make the tick markers point outwards in matplotlib?

Coordinates marker of x and y are pointing inside the graph not outside the graph

Jody Klymak
  • 4,979
  • 2
  • 15
  • 31
  • The axis restrictions can be [reversed](https://matplotlib.org/stable/gallery/subplots_axes_and_figures/invert_axes.html) or handled by the [API](https://stackoverflow.com/questions/2051744/reverse-y-axis-in-pyplot). – r-beginners Jan 05 '22 at 06:27
  • 1
    What do you mean by invert? Swap x for y? Get in screen space? – Jody Klymak Jan 05 '22 at 07:13
  • @JodyKlymak I mean how to control the small grid lines on x and y axis. In the image its on the inner side of the axes, but, I want it to be in the outward direction – Abhishek Pal Jan 05 '22 at 07:56
  • https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.tick_params.html – Jody Klymak Jan 05 '22 at 08:11
  • I took the liberty of editing your title to use the Matplotlib terminology. – Jody Klymak Jan 05 '22 at 08:14

1 Answers1

0

Based on your comment more than your initial question, I think what you want to do is:

ax.tick_params(axis="both",direction="out")

Have a look at matplotlib documentation for more details.

Thrasy
  • 536
  • 3
  • 9