Re: Plotting in WxPython

Tanmay Agrawal <[email protected]> Mon, 22 Aug 2022 20:18:55 +0530
Newsgroups gmane.comp.python.wxglade
Message-ID <CALF8AQOkqV8bgOxiQCNJqyGpVEzOet1KGF8sbCRztAaQr-Ru6Q@mail.gmail.com>
Hi Mr. Dietmar,
Thanks a lot for replying.

I am using the FigureCanvasAgg instead of FigureCanvas*Wx*Agg. Other than
that everything is same. Do you think that can be the reason for the
problem? Actually I don't have the hardware with me, so can't test it right
now.

Also, the plots are dynamic in nature. *FuncAnimation *is used for that
purpose right now in my plots file (the file which is computing plots).
Do I need to make any special changes for that?
Regards,
Tanmay

On Mon, Aug 22, 2022 at 7:06 PM Dietmar Schwertberger <
[email protected]> wrote:

> On 22.08.2022 13:48, Tanmay Agrawal wrote:
> > self.canvas = FigureCanvas(self, -1, fig)
> > TypeError: __init__() takes from 1 to 2 positional arguments but 4
> > were given
>
> I would guess that you're using a wrong Canvas version.
>
> wxGlade includes three matplotlib examples.
>
>
> Code from the first example:
>
> import matplotlib
> from matplotlib.figure import Figure
> from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as
> FigureCanvas
>
> figure = Figure()
> self.matplotlib_axes = figure.add_subplot(111)
> self.matplotlib_canvas = FigureCanvas(self.panel_1, wx.ID_ANY, figure)
>
>
> Regards,
>
> Dietmar
>
>
>
> _______________________________________________
> wxGlade-general mailing list
> wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/wxglade-general
>

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general