[Ncr-Python.in] HELP REQUIRED [MATPLOTLIB ERROR]

Prabu Palanisamy prabu.tcs.psg at gmail.com
Wed Jun 18 09:42:53 CEST 2014


Hi

Can you add this import in the begining of the code?
import matplotlib
matplotlib.use('Agg')

Thanks and Regards
Prabu


On Wed, Jun 18, 2014 at 12:03 PM, Amit Sethi <amit.pureenergy at gmail.com>
wrote:

> Aniket , I get a feeling you are not running this script on your
> machine but are actually sshed into some other machine.
> I think the problem might be that the other machine does not have an X
>
> Thanks
> Amit
>
> On Fri, May 23, 2014 at 10:28 AM, Aniket Maithani
> <maithani.aniket at gmail.com> wrote:
> > I am recreating the error. Will post the detailed report in a while
> >
> >
> > On Fri, May 23, 2014 at 1:35 AM, Jaidev Deshpande
> > <deshpande.jaidev at gmail.com> wrote:
> >>
> >>
> >>
> >>
> >> On Fri, May 23, 2014 at 1:30 AM, Jaidev Deshpande
> >> <deshpande.jaidev at gmail.com> wrote:
> >>>
> >>>
> >>>
> >>>
> >>> On Thu, May 22, 2014 at 6:54 PM, Gora Mohanty <gora at mimirtech.com>
> wrote:
> >>>>
> >>>> On 22 May 2014 18:13, Aniket Maithani <maithani.aniket at gmail.com>
> wrote:
> >>>> > I did but nothing worked
> >>>>
> >>>> It is almost certainly either an installation issue, or you need to
> >>>> add a call in order to create the canvas. I would have thought that
> >>>> one of the solutions proposed in the Stackoverflow thread would have
> >>>> worked.
> >>>>
> >>>> Regards,
> >>>> Gora
> >>>> _______________________________________________
> >>>> https://mail.python.org/mailman/listinfo/ncr-python.in
> >>>> Mailing list guidelines
> >>>> :http://python.org.in/wiki/NcrPython/MailingListGuidelines
> >>>
> >>>
> >>> Try plt.show() instead of plt.draw() in the last line.
> >>>
> >>> --
> >>> JD
> >>
> >>
> >> Also, read the documentation on the pyplot API. According to this link -
> >> http://matplotlib.org/1.3.1/api/pyplot_api.html#matplotlib.pyplot.draw
> -
> >> your script hasn't displayed anything at all, and the draw function
> expects
> >> a figure to be already drawn.
> >>
> >> When plt.draw() is called, it destroys the original canvas and creates
> >> another one, but in your case there was no canvas because there was no
> >> figure. Therefore, the canvas.destroy() method failed.
> >>
> >> --
> >> JD
> >>
> >> _______________________________________________
> >> https://mail.python.org/mailman/listinfo/ncr-python.in
> >> Mailing list guidelines
> >> :http://python.org.in/wiki/NcrPython/MailingListGuidelines
> >
> >
> >
> > _______________________________________________
> > https://mail.python.org/mailman/listinfo/ncr-python.in
> > Mailing list guidelines
> > :http://python.org.in/wiki/NcrPython/MailingListGuidelines
>
>
>
> --
> A-M-I-T S|S
> _______________________________________________
> https://mail.python.org/mailman/listinfo/ncr-python.in
> Mailing list guidelines :
> http://python.org.in/wiki/NcrPython/MailingListGuidelines
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ncr-python.in/attachments/20140618/65e7d9c9/attachment-0001.html>


More information about the Ncr-Python.in mailing list