On 7/12/10 5:34 PM, Steve McFarlin wrote:
> Hello,
>
> I have an issue rendering with basemap on a Debian server using Agg. I have
> confirmed that matplotlib does render using the following example.
>
> # do this before importing pylab or pyplot
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pyplot as plt
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.plot([1,2,3])
> fig.savefig('test.png')
>
> However, I receive the following results when using basemap
>
> Traceback (most recent call last):
> File "testImageGen.py", line 117, in<module>
> setCommonBaseMapProperties(m)
> File "/home/forecast/sgWaveModel/sgUtil.py", line 34, in
> setCommonBaseMapProperties
> bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py",
> line 1479, in drawcoastlines
> self.set_axes_limits(ax=ax)
> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py",
> line 2607, in set_axes_limits
> and not ax.get_autoscalex_on()
> AttributeError: 'AxesSubplot' object has no attribute 'get_autoscalex_on'
>
>
> I am using matplotlib.use('Agg') as the first call in the script. The call to
> bmpa.drawcoastlines is the first call to basemap I make in my scripts. This
> works on a system with a windowing toolkit. Any ideas?
>
>
> - steve
>
>
Steve: What's your matplotlib version? Does adding
ax.get_autoscalex_on()
in your first script cause that to fail as well?
-Jeff
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users