How to turn off autoscaling in matplotlib.pyplot
Question: I am using matplotlib.pyplot in python to plot my data. The problem is the
image it generates seems to be autoscaled. How can I turn this off so that
when I plot something at (0,0) it will be placed fixed in the center?


Answer: You want the
[`autoscale`](http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.autoscale)
function:

    
    
    from matplotlib import pyplot as plt
    
    # Set the limits of the plot
    plt.xlim(-1, 1)
    plt.ylim(-1, 1)
    
    # Don't mess with the limits!
    plt.autoscale(False)
    
    # Plot anything you want
    plt.plot([0, 1])
    

