1

I draw a unit circle: enter image description here

Due to the intersection of the circle and the axes, xticks and yticks labels are invisible. How can I place these tick labels to nearby places while keeping previous labels?

ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712
Kenenbek Arzymatov
  • 8,439
  • 19
  • 58
  • 109
  • Maybe you first want to read existing questions and answers, e.g. [this](https://stackoverflow.com/questions/28615887/how-to-move-a-ticks-label-in-matplotlib) and show in how far they don't help? – ImportanceOfBeingErnest Mar 30 '19 at 00:15

1 Answers1

1

You can add text to the figure using plt.axis(x,y,'text') to effectively position tick labels wherever you want:

# Remove tick labels
ax.set_xticklabels('')
ax.set_yticklabels('')

# Add more visible tick labels with a slight offset
plt.text(0.05,0.05,'0')
plt.text(1.05,0.05,'1')
plt.text(0.05,1.05,'1')
plt.text(-0.95,0.05,'-1')
plt.text(0.05,-0.95,'-1')

Plot with offset labels

Nathaniel
  • 3,230
  • 11
  • 18