Plot 3D Contour from an Image using extent with Matplotlib
问题 As I present here (in 2D), I'm wondering if how I could "scale" an image input to be plotted to a range in the plot. To be more clear, this is what I need: I have a 400 * 400 image that is generated based on a function which interval is -1..1. So, I do a translate to save this data, like this: x = Utils.translate(pos_x, 0, self.width, -1, 1) y = Utils.translate(pos_y, 0, self.height, -1, 1) data = Utils.map_position_to_function(x, y) I.e, first I map its position to my range and then I