[Matplotlib-users] zoom a plot

2014-09-15 Thread Xiaobo Yang
Hi, I use matplotlib to create a png file, then display it in a web browser. All works fine. Now I want to zoom the plot. What I can think of is: 1) Get coordinates (x1, y1), (x2, y2) of the image when user makes an area selection on the image; 2) Convert (x1, y1), (x2, y2) to the real values mat

[Matplotlib-users] get_xlim of dates

2014-09-16 Thread Xiaobo Yang
Hi, My X axis represents dates. When I used get_xlim(), I got something like 735461.0 and 735490.5. What are these values? How can I convert to python date objects? Many thanks, Tom -- Want excitement? Manually upgrade yo

Re: [Matplotlib-users] get_xlim of dates

2014-09-16 Thread Xiaobo Yang
many thanks - was struggling to find out where's the document! On 16 September 2014 17:20, Scott Lasley wrote: > > On Sep 16, 2014, at 11:31 AM, Xiaobo Yang wrote: > > > Hi, > > > > My X axis represents dates. When I used get_xlim(), I got something like > 73

[Matplotlib-users] Basemap scatter plot, set color according to value

2014-09-22 Thread Xiaobo Yang
Hi, I want to show some points on a world map. But the color of a point is linked to the value at the point. Any idea why the code below does not give what I want (same color, no legend)? Many thanks, Tom from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import numpy as np