One way to use images as a marker would be to use offsetbox module.
Here is an example adopted from
http://matplotlib.sourceforge.net/examples/pylab_examples/demo_annotation_box.html
Regards,
-JJ
import matplotlib.pyplot as plt
from matplotlib.offsetbox import OffsetImage, AnnotationBbox
from
I've for now taken a different approach that means I won't need custom
markers from images.
But I'm just curious: is there any wish/plans in Matplotlib to add support
for this? I think it could do a lot to expand what's possible in terms of
the look and feel of plots (even without things
It would be a nice idea. I'm not sure it's something that would work
terribly well in vector backends as the images may not scale well. I
should mention that there is already support to use arbitrary Unicode
characters or math expressions as markers already, which does work well
in vector
Right. It should be technically feasible to just simply tell figimage to
use a different transformation object, but this might have implications
elsewhere. I am very hazy in this part of mpl.
Hmm, I've simplified the figimage to just this line:
fig.figimage(im,100,100,origin=upper,
On Wed, Feb 29, 2012 at 5:47 PM, C M cmpyt...@gmail.com wrote:
I'd like to use, in one case, small loaded images (pngs) as markers on an
interactive matplotlib plot (using the OO approach). I'd potentially like
to be able to point-pick these markers, too, as well as have them update
Yeah, there are better ways to do that, somewhat. The problem with the
proposed solution is that it relies on non-public APIs, which are can be
subject to change without deprecation. Instead, I would have created the
figimage object with a particular transform object that would have placed
On Thu, Mar 1, 2012 at 1:11 PM, C M cmpyt...@gmail.com wrote:
Yeah, there are better ways to do that, somewhat. The problem with the
proposed solution is that it relies on non-public APIs, which are can be
subject to change without deprecation. Instead, I would have created the
figimage
I'd like to use, in one case, small loaded images (pngs) as markers on an
interactive matplotlib plot (using the OO approach). I'd potentially like
to be able to point-pick these markers, too, as well as have them update
appropriately if the plot is resized.
The only example I've been to find of