Jae-Joon Lee wrote:
> Eric,
> 
> Just a minor concern about "locator_params" implicitly calling 
> "autoscale_view".
> For example,
> 
> ax1 = subplot(121)
> ax1.plot([1,2,3])
> ax1.locator_params("x", nbins=5)
> ax1.margins(0.1, tight=True)
> 
> ax2 = subplot(122)
> ax2.plot([1,2,3])
> ax2.margins(0.1, tight=True)
> ax2.locator_params("x", nbins=5)
> 
> Same commands are applied to each subplot but with different order,
> and the results are different.
> "ax.2locator_params("x", bnins=5)" implicitly calls
> "ax2.autoscale_view(tight=False)", overriding tight=True in margins
> call.
> 
> And I think this is a bit confusing.

I agree, and I was aware of this problem.  It arises from the fact that 
the "tight" state is not saved, as I think it should be.  I will look 
into fixing that.

> 
> I understand that autoscale_view depends on locator. Still at least
> some option to prevent calling "autoscale_view" may be needed?

That seems to me like a more complex and confusing solution than saving 
the "tight" setting, and keeping it until it is explicitly changed by 
its own setter, by autoscale_view, or by margins.  The default for 
autoscale_view will then be to change "tight" only if the kwarg is 
provided and is not None.

Eric

> 
> Regards,
> 
> -JJ


------------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to