Revision: 4667
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4667&view=rev
Author: mdboom
Date: 2007-12-07 11:05:11 -0800 (Fri, 07 Dec 2007)
Log Message:
-----------
[ 1697287 ] imshow on log axes broken if axes limits != image extent
Adds a warning when an image is used on non-linear axes. Doesn't
really address the problem (see bug report for the reason.)
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/image.py
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py 2007-12-07 18:22:30 UTC (rev
4666)
+++ trunk/matplotlib/lib/matplotlib/image.py 2007-12-07 19:05:11 UTC (rev
4667)
@@ -4,7 +4,7 @@
"""
from __future__ import division
-import sys, os
+import sys, os, warnings
import numpy as npy
@@ -185,6 +185,9 @@
def draw(self, renderer, *args, **kwargs):
if not self.get_visible(): return
+ if (self.axes.get_xscale() != 'linear' or
+ self.axes.get_yscale() != 'linear'):
+ warnings.warn("Images are not supported on non-linear axes.")
im = self.make_image(renderer.get_image_magnification())
l, b, widthDisplay, heightDisplay = self.axes.bbox.get_bounds()
renderer.draw_image(l, b, im, self.axes.bbox)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins