<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">When an axis is shared with another its registered "xlim_changed" callbacks does not get called when the change is induced by a shared axis (via sharex=).</p>
<p dir="auto">In _base.py the set_xlim for sibling axis are called with emit=False:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="matplotlib/lib/matplotlib/axes/_base.py:

/.../
def set_xlim(...)
/.../
        if emit:
            self.callbacks.process('xlim_changed', self)
            # Call all of the other x-axes that are shared with this one
            for other in self._shared_x_axes.get_siblings(self):
                if other is not self:
                    other.set_xlim(self.viewLim.intervalx,
                                   emit=False, auto=auto)"><pre class="notranslate"><code class="notranslate">matplotlib/lib/matplotlib/axes/_base.py:

/.../
def set_xlim(...)
/.../
        if emit:
            self.callbacks.process('xlim_changed', self)
            # Call all of the other x-axes that are shared with this one
            for other in self._shared_x_axes.get_siblings(self):
                if other is not self:
                    other.set_xlim(self.viewLim.intervalx,
                                   emit=False, auto=auto)
</code></pre></div>
<p dir="auto">I'm very new to matplotlib, so perhaps there is a good reason for this? emit=False seems to disable both continued "inheritance" of axis (why?) and triggering of change callbacks (looking at the code above).</p>
<p dir="auto">It seems like one would at least want to trigger the xlim_changed callbacks as they would be intended to react to any change in axis limits.</p>
<p dir="auto">Edit: Setting emit=True seems to introduce a recursion issue (not sure why but as inheritance seems to be passed along anyway it doesn't really matter). Moving the callback call to outside of the "if emit:"-statement seems to solve the issue as far as I can see when trying it out. Any reason to keep it inside the if-statement?</p>
<p dir="auto">When I saving a SVG figure is slowed down significantly (10-100x) when I use LaTeX, enabled by the following rc-setting:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="text.usetex : true"><pre class="notranslate"><span class="pl-s1">text</span>.<span class="pl-s1">usetex</span> : <span class="pl-s1">true</span></pre></div>
<p dir="auto">Note that rendering is somewhat slower, but not much. It is really the saving. I am on macOS 10.12.6 with matplotlib (2.1.0).</p>