Hi All,

    I am currently trying to plot 4 points (but they will be more, in
an animated sequence later), and I am trying to use an image as a
point marker. I am using the axes transData transform to get the point
coordinates from the data world to the display world.

Everything seems to be working OK (i.e., the images are placed
correctly close to the plot points); however, as soon as I try to
force the axes into an "equal" aspect ratio with this command:

ax.set_aspect('equal')

Then all the calculations are messed up and the images end up very far
from the plot points. I have tried also the approach mentioned in this
StackOverflow post:

http://stackoverflow.com/questions/2318288/how-to-use-custom-marker-with-plot

But I get the same wrong answer when I set the "equal" aspect ratio
for the axes.

I am attaching a small sample application which demonstrates the
problem, a small  "smiley.png" image needed to run the script and two
plots generated by my script, one with the "equal" aspect ratio and
the other without.

I appreciate any suggestion, as I feel I am missing something important...

Thank you in advance.


Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

# ------------------------------------------------------------- #
def ask_mailing_list_support(email):

    if mention_platform_and_version() and include_sample_app():
        send_message(email)
    else:
        install_malware()
        erase_hard_drives()
# ------------------------------------------------------------- #

Attachment: image_in_axes.py
Description: Binary data

<<attachment: smiley.png>>

<<attachment: axes_equal.png>>

<<attachment: axes_not_equal.png>>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to