On Wed, Nov 3, 2010 at 1:18 AM, David Frey <dpf...@shaw.ca> wrote: > ... > My data in the y-axis (address space usage) is fairly uniform (0-2000 MB > values), but my data in the x-axis (the time at which the the trace statements > were executed) is highly clustered. For example, I have approximately 150 > data points over a 5 minute run, but some of the data points are only 10ms > apart. > > I would like to annotate each point on the graph with the line number in the > log file so that the user can look up what was happening at that point. I > have > succeeded, but the graph isn't readable because there is so much overlap in > the points.
You might want to create multiple subplots, with some of the subplots/axes zoomed in on the main axes. See this example: http://matplotlib.sourceforge.net/examples/pylab_examples/axes_zoom_effect.html It looks like the image isn't on the website. You can run the example on your local machine by saving it from the [source code] link at the top of the page. That seems to work well if you know in advance how many zoom areas you want, or are working with it interactively. If you want to auto-generate the whole figure, you might want to try something like this: - figure out how many zoom regions you need (e.g., by figuring out how many clusters you have) - use figure.add_subplot() or axes_grid1 (http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html) to place all of your separate axes - plot the main figure and all of the zoom regions BTW, if the "axes_zoom_effect" image could be added to the gallery, it's the example I was thinking about in the "Vlines across multiple subplots" thread: http://permalink.gmane.org/gmane.comp.python.matplotlib.general/24999 Hope that helps, Justin ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users