<divid="unreleased-message"> You are reading an old version of the documentation (v2.2.2). For the latest version see <ahref="https://matplotlib.org/stable/devel/MEP/MEP15.html">https://matplotlib.org/stable/devel/MEP/MEP15.html</a></div>
<h1>MEP15 - Fix axis autoscaling when limits are specified for one axis only<aclass="headerlink" href="#mep15-fix-axis-autoscaling-when-limits-are-specified-for-one-axis-only" title="Permalink to this headline">¶</a></h1>
<h2><aclass="toc-backref" href="#id2">Branches and Pull requests</a><aclass="headerlink" href="#branches-and-pull-requests" title="Permalink to this headline">¶</a></h2>
<p>None so far.</p>
</div>
<divclass="section" id="abstract">
<h2><aclass="toc-backref" href="#id3">Abstract</a><aclass="headerlink" href="#abstract" title="Permalink to this headline">¶</a></h2>
<p>When one axis of a 2-dimensional plot if overridden via <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">xlim</span></code> or <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ylim</span></code>,
automatic scaling of the remaining axis should be based on the data that falls
within the specified limits of the first axis.</p>
</div>
<divclass="section" id="detailed-description">
<h2><aclass="toc-backref" href="#id4">Detailed description</a><aclass="headerlink" href="#detailed-description" title="Permalink to this headline">¶</a></h2>
<p>When axis limits for a 2-D plot are specified for one axis only (via <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">xlim</span></code> or
<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ylim</span></code>), matplotlib currently does not currently rescale the other axis. The
result is that the displayed curves or symbols may be compressed into a tiny
portion of the available area, so that the final plot conveys much less
information than it would with appropriate axis scaling.</p>
<p>The proposed change of behavior would make matplotlib choose the scale for the
remaining axis using only the data that falls within the limits for the axis
where limits were specified.</p>
</div>
<divclass="section" id="implementation">
<h2><aclass="toc-backref" href="#id5">Implementation</a><aclass="headerlink" href="#implementation" title="Permalink to this headline">¶</a></h2>
<p>I don’t know enough about the internals of matplotlib to be able to suggest an
implementation.</p>
</div>
<divclass="section" id="backward-compatibility">
<h2><aclass="toc-backref" href="#id6">Backward compatibility</a><aclass="headerlink" href="#backward-compatibility" title="Permalink to this headline">¶</a></h2>
<p>From the standpoint of software interfaces, there would be no break in
backward compatibility. Some outputs would be different, but if the user
truly desires the previous behavior, he/she can achieve this by overriding
the axis scaling for both axes.</p>
</div>
<divclass="section" id="alternatives">
<h2><aclass="toc-backref" href="#id7">Alternatives</a><aclass="headerlink" href="#alternatives" title="Permalink to this headline">¶</a></h2>
<p>The only alternative that I can see is to maintain the status quo.</p>