For duplicate-markers: I am fully aware that there are some similar questions in matplotlib
, such as this one. My question is about Tkinter
not matplotlib
.
I am now importing Lena into python and drawing a green dot at her hat with
In [72]: from PIL import Image
....: import matplotlib.pylab as plt
....: im = Image.open('lena.jpg')
....: fig = plt.figure()
....: axes = fig.add_axes([0.1, 0.1, 0.8, 0.8])
....: axes.imshow(im)
....: axes.scatter(50, 50, marker='s', color='green')
Out[72]: <matplotlib.collections.PathCollection at 0xb3e2ef0>
(Please ignore the red dot)
I now want the green dot (50, 50)
to be still on Lena's hat, but I also want the green dot to be drawn at the left bottom corner instead of the left top corner.
I expect something like this:
As seen, I managed to do this easily in matplotlib
with one additional line:
axes.invert_yaxis()
Question
I am now drawing on the canvas in Tkinter
.
How may I achieve the same effect?
Update
Lena is merely for illustration of my purpose. In my real problem, I am not importing anything in Tkinter
. I merely draw on a empty canvas. I am reluctant to modify my data, I only wish to have the drawing upside down. Like in my Lena illustration, the coordinate is still (50, 50)
. The difference is that now it is in the left bottom instead of top corner.