user2978000
user2978000

Reputation: 3

matplotlib: how to show markers on canvas boundary

Matplotlib hides part of the data marker if it is on the canvas boundary. For example, if the plot limit is set to xlim(0,1) and ylim(0,1), and a data point at (0.0,0.5) is plotted as a circle, only the right half of the circle is visible on the plot. How to show the hidden part of the marker? It is strange that text does not have such limitation but data marker does.

Upvotes: 0

Views: 416

Answers (1)

Ofri Raviv
Ofri Raviv

Reputation: 24823

Use set_clip_on(False)

import matplotlib.pyplot as plt
h = plt.plot([0, 0, 1, 1], [0, 1, 1, 0], 'bo')
h[0].set_clip_on(False)
plt.show()

Upvotes: 1

Related Questions