Carol Leger wrote:
> Hi Folks,
>
> I have acquired some code that was running on a previous version of
> matplotlib. I am now using version 0.91.2.
>
> The code I acquired uses the following code fragment:
> import pylab
> from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
> <other stuff>
> figure = matplotlib.pylab.Figure( figsize=(8,6), # 8"x6" is default
> facecolor='r' )
> canvas = FigureCanvas( figure )
>
> # ( left, bottom, width, height )
> axes_ts = figure.add_axes( ( 0.05, 0.0, 0.75, 0.04 ) )
> axes_ts.set_axis_off()
>
>
> subplots = []
>
> axes_ll = figure.add_axes( ( 0.05, 0.05, 0.9, 0.9 ) ) # l, l
> subplots.append( (axes_ll, data_sets[ 0 ]) )
>
> for subplot in subplots:
> axes = subplot[ 0 ]
> data_set = subplot[ 1 ]
> axes.set_xlim( -1.0, 1.0 )
> axes.set_ylim( -1.0, 1.0 )
> axes.set_aspect( 'equal' , fixLimits=True ) <+++++++
> axes.set_axis_off()
> data_set.render( axes, fm, to )
>
>
> It seems that axes.set_aspect does not have a keyword of fixLimits. Did
> it ever? Does it depend on the backend? The original code used GTKAgg.
> I am not using GTKAgg. I am just using a default backend.
Carol,
That kwarg was eliminated a little less than 2 years ago as part of a
major reworking of aspect ratio handling. It never depended on the
backend.
The kwarg equivalent to fixLimits=True is adjustable='box'. Quite a bit
has changed in the last two years, though, so there may be other things
in your code that need to be updated.
Eric
|