<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">The FigureCanvasBase defines the signatures of various event handlers, such as <code class="notranslate">motion_notify_event(self, x, y, guiEvent=None)</code>.  The qt and wx backends define their own handlers in a GUI-specific fashion (<code class="notranslate">mouseMoveEvent(self, event)</code> for qt (which is the only toolkit to use a subclassing approach), <code class="notranslate">_onMotion(self, evt)</code> + <code class="notranslate">Bind(wx.EVT_MOTION, self._onMotion)</code> for wx); as such, one can programatically trigger an event in a backend-independent fashion on a qt or wx canvas by calling its <code class="notranslate">motion_notify_event</code> method.</p>
<p dir="auto">On the other hand, the gtk3 and tk backends, which use a registration approach like wx, <em>redefine</em> <code class="notranslate">motion_notify_event</code> to have a different signature that matches what the GUI toolkit expects.  The signature of <code class="notranslate">motion_notify_event</code> is <code class="notranslate">(self, widget, event)</code> on gtk3, and <code class="notranslate">(self, event)</code> on tk.</p>
<p dir="auto">Instead, these handlers should be made private (similarly to how the wx backend does), so that  calling <code class="notranslate">canvas.motion_notify_event(x, y)</code> truly works in a backend-independent fashion.  (Of course, a proper deprecation period can be implemented by temporarily making these methods take <code class="notranslate">*args</code> and dispatch accordingly.)</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Matplotlib version: master/any</li>
</ul>
<p dir="auto"><code class="notranslate">FigureCanvas.motion_notify_event</code> and other event handlers have different signatures across backends:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="lib/matplotlib/backend_bases.py
1893:    def motion_notify_event(self, x, y, guiEvent=None):

lib/matplotlib/backends/backend_gtk.py
321:    def motion_notify_event(self, widget, event):

lib/matplotlib/backends/backend_tkagg.py
386:    def motion_notify_event(self, event):

lib/matplotlib/backends/backend_gtk3.py
263:    def motion_notify_event(self, widget, event):"><pre class="notranslate"><code class="notranslate">lib/matplotlib/backend_bases.py
1893:    def motion_notify_event(self, x, y, guiEvent=None):

lib/matplotlib/backends/backend_gtk.py
321:    def motion_notify_event(self, widget, event):

lib/matplotlib/backends/backend_tkagg.py
386:    def motion_notify_event(self, event):

lib/matplotlib/backends/backend_gtk3.py
263:    def motion_notify_event(self, widget, event):
</code></pre></div>
<p dir="auto">Note that the default signature is written in such a way that one can programmatically trigger an event on the canvas <em>without</em> having to instantiate a native event object, which may be tricky (yes, you could always mock the event but that's obviously not optimal).  It would be preferrable if all backends kept the same signature (which would probably involve breaking backcompat).</p>