Drawing in a matplotlib widget in QtDesigner
<p>I created in QtDesigner this QDialog:</p>

<p><a href="https://i.stack.imgur.com/wkcFW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wkcFW.jpg" alt="enter image description here"></a></p>

<p>I would like to know how can I draw something in this Matplotlib widget that I put there. I mean, if I write some code to create a matplotlib figure without Qt Designer, I can write something like:</p>

<pre><code>self.figure_canvas = FigureCanvas(Figure())

self.axes = self.figure_canvas.figure.add_subplot(111)

x = np.arange(0,5,0.5)
y = np.sin(x)
</code></pre>

<p>and then draw doing:</p>

<p><code>ax.plot(x,y)</code> or <code>self.axes.plot(x,y)</code></p>

<p>How can I access to this widget  to draw something? Hope you can help me.</p>