Hi
I am developing on a Desktop install Ubuntu 9.04 machine with matplotlib
0.98.5.2,
and running the scripts on a Server install Ubuntu 8.10 machine with matplotlib
0.98.3.
I have found that the X axis layout for the same script varies between the two
machines.
Both have standard matplotlib installs using apt-get. I haven't made any tweaks.
Rather than go into great detail about the problem, please see the script below
and links to the resulting png files.
I hope the png files tell the story.
http://waka.freehostia.com/python/date_axis_scaling_test.py
http://waka.freehostia.com/python/date_axis_scaling_test_0_98_3.png
http://waka.freehostia.com/python/date_axis_scaling_test_0_98_5_2.png
The plot produced by matplotlib 0.98.3 isn't what I want.
Id like the plot to go edge to edge on the x axis grid, as the matplotlib
0.98.3 version does.
Help and advise would be appreciated.
PS : I'm new to python & matplotlib
######################################################################################
#!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
version = matplotlib.__version__
HOURSBACK = 365 * 24
now = datetime.now()
valueList = []
dateList = []
for i in range(HOURSBACK):
hoursBack = timedelta( hours = (HOURSBACK - i) )
then = now - hoursBack
valueList.append( i )
dateList.append( then )
fig = plt.figure( figsize=(12, 9), dpi=100 )
ax = fig.add_subplot(111)
ax.plot(dateList, valueList)
plt.title('Date axis scaling test for matplotlib version : %s' % ( version ) )
plt.grid(True)
plt.ylabel('Widgets')
plt.xlabel('Date')
fig.autofmt_xdate()
plt.savefig( "date_axis_scaling_test_%s.png" % version.replace('.','_'),
format='png' )
quit()
######################################################################################
_________________________________________________________________
Get the best of MSN on your mobile
http://clk.atdmt.com/UKM/go/147991039/direct/01/
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users