2011/3/11 Luciano Fleischfresser <l_...@yahoo.com>: > [...] > I have to confess that object-oriented programming seems very > counter-intuitive to me. > Hopefully it will come more naturally soon.
This has nothing to do with OOP, you just need to know what command/function/method does what you want. It happens that in matplotlib plots are autoscaled by default but not tightly. You can change this behavoir using autoscale. There is a functional version pyplot.autoscale but for scripting is usually better the axes.autoscale version because it make explicit in your code which axes is affected. For interactive plotting, the functional version may be more convenient. > > Along the same lines of my original query, this one I think is more obscure, > so here it goes: > > Same script, just another .csv file with the same format. This time around, > the plot comes up > with UTC times for the labels on the x-axis. The first one came with the > dates. > > Does anybody know how to tell matplotlib to always put dates? Matplotlib automatically choose a formatter for labels, based on the interval to plot and the like. If you don't like it, use your own. Maybe this: import matplotlib.dates as mdates formatter = mdates.DateFormatter('%d-%b-%y-%H:%M:%S') axes.xaxis.set_major_formatter(formatter) Goyo ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users