[TriPython] Help with matplotlib plotting from pandas (installed by conda)
Francois Dion
francois.dion at gmail.com
Tue Jan 22 10:02:27 EST 2019
Glad you got it working. As an additional note:
%matplotlib inline is only for the jupyter notebook or the jupyter
qtconsole, not ipython etc.
%matplotlib notebook is another jupyter notebook only setting giving you
some interactivity.
There is a default backend and plt.show() should popup something, as long
as your terminal has a display set correctly (ie on a remote machine,
you'll need to forward X)
Francois
On Mon, Jan 21, 2019 at 10:37 PM David Handy <david at handysoftware.com>
wrote:
> Thanks Art! I had not tried "%matplotlib inline" yet.
>
>
>
> When I did that, I got an import error and had to install ipykernel.
>
>
>
> Then I got:
>
> UnknownBackend: No event loop integration for 'inline'. Supported event
> loops are: qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx
>
>
>
> After some googling, I tried:
>
> %matplotlib tk
>
>
>
> ... and then plotting worked!
>
>
>
> Thanks,
>
> David H
>
>
>
> On Monday, January 21, 2019 10:13pm, "Art" <artem.nesterenko at gmail.com>
> said:
>
> > _______________________________________________
> > TriZPUG mailing list
> > TriZPUG at python.org
> > https://mail.python.org/mailman/listinfo/trizpug
> > http://tripython.org is the Triangle Python Users Group
> > Your code works fine for me. I can see the chart. Here're my imports:
> >
> > import pandas as pd
> > import numpy as np
> > import matplotlib.pyplot as plt
> > %matplotlib inline
> >
> > - Art.
> >
> > Art Nestsiarenka
> > email: artem.nesterenko at gmail.com
> >
> >
> >
> >
> >
> > On Mon, Jan 21, 2019 at 7:19 PM David Handy <david at handysoftware.com>
> > wrote:
> >
> > > Hi Python / data science friends -
> > >
> > >
> > >
> > > I'm switching to use conda instead of pip, at least for this
> particular
> > > data science project. I installed pandas, ipython matplotlib, and am
> > > working through the pandas intro:
> > > http://pandas.pydata.org/pandas-docs/stable/10min.html
> > >
> > >
> > >
> > > Everything seems to be working fine except plotting:
> > >
> > >
> > >
> > > In [35]: ts = pd.Series(np.random.randn(1000),
> > > index=pd.date_range('1/1/2000', p
> > > ...: eriods=1000))
> > >
> > > In [36]: ts = ts.cumsum()
> > >
> > > In [37]: ts.plot()
> > > Out[37]: <matplotlib.axes._subplots.AxesSubplot at 0x7f8c78066190>
> > >
> > >
> > >
> > > ... and that's it. No window pops up, nothing gets displayed.
> > >
> > >
> > >
> > > I'm running Fedora Linux.
> > >
> > >
> > >
> > > What basic thing am I missing? Was I supposed to install something
> > > related
> > > to Tkinter to plot via tkinter?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > David H
> > >
> > >
> > > _______________________________________________
> > > TriZPUG mailing list
> > > TriZPUG at python.org
> > > https://mail.python.org/mailman/listinfo/trizpug
> > > http://tripython.org is the Triangle Python Users Group
> > >
> > Your code works fine for me. I can see the chart. Here're my imports:
> > import pandas as pd
> > import numpy as np
> > import matplotlib.pyplot as plt
> > %matplotlib inline
> > - Art.
> > Art Nestsiarenka
> > email: [1]artem.nesterenko at gmail.com
> >
> > On Mon, Jan 21, 2019 at 7:19 PM David Handy <[2]
> david at handysoftware.com>
> > wrote:
> >
> > ** **Hi Python / data science friends -
> >
> > ** **I'm switching to use conda instead of pip, at least for this
> > particular
> > ** **data science project. I installed pandas, ipython matplotlib, and
> > am
> > ** **working through the pandas intro:
> > ** **[3]http://pandas.pydata.org/pandas-docs/stable/10min.html
> >
> > ** **Everything seems to be working fine except plotting:
> >
> > ** **In [35]: ts = pd.Series(np.random.randn(1000),
> > ** **index=pd.date_range('1/1/2000', p
> > ** ** ** **...: eriods=1000))
> >
> > ** **In [36]: ts = ts.cumsum()
> >
> > ** **In [37]: ts.plot()
> > ** **Out[37]: <matplotlib.axes._subplots.AxesSubplot at
> > 0x7f8c78066190>
> >
> > ** **... and that's it. No window pops up, nothing gets displayed.
> >
> > ** **I'm running Fedora Linux.
> >
> > ** **What basic thing am I missing? Was I supposed to install
> something
> > related
> > ** **to Tkinter to plot via tkinter?
> >
> > ** **Thanks,
> >
> > ** **David H
> >
> > _______________________________________________
> > TriZPUG mailing list
> > [4]TriZPUG at python.org
> > [5]https://mail.python.org/mailman/listinfo/trizpug
> > [6]http://tripython.org is the Triangle Python Users Group
> >
> > References
> >
> > Visible links
> > 1. mailto:artem.nesterenko at gmail.com
> > 2. mailto:david at handysoftware.com
> > 3. http://pandas.pydata.org/pandas-docs/stable/10min.html
> > 4. mailto:TriZPUG at python.org
> > 5. https://mail.python.org/mailman/listinfo/trizpug
> > 6. http://tripython.org/
> >
> _______________________________________________
> TriZPUG mailing list
> TriZPUG at python.org
> https://mail.python.org/mailman/listinfo/trizpug
> http://tripython.org is the Triangle Python Users Group
>
--
about.me/francois.dion - www.pyptug.org - www.3DFutureTech.info - @f_dion
<http://twitter.com/f_dion>
-------------- next part --------------
Glad you got it working. As an additional note:
%matplotlib inline is only for the jupyter notebook or the jupyter
qtconsole, not ipython etc.
%matplotlib notebook is another jupyter notebook only setting giving you
some interactivity.
There is a default backend and plt.show() should popup something, as long
as your terminal has a display set correctly (ie on a remote machine,
you'll need to forward X)
Francois
On Mon, Jan 21, 2019 at 10:37 PM David Handy <[1]david at handysoftware.com>
wrote:
** **Thanks Art! I had not tried "%matplotlib inline" yet.
** **When I did that, I got an import error and had to install
ipykernel.
** **Then I got:
** **UnknownBackend: No event loop integration for 'inline'. Supported
event
** **loops are: qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx
** **After some googling, I tried:
** **%matplotlib tk
** **... and then plotting worked!
** **Thanks,
** **David H
** **On Monday, January 21, 2019 10:13pm, "Art"
<[2]artem.nesterenko at gmail.com>
** **said:
** **> _______________________________________________
** **> TriZPUG mailing list
** **> [3]TriZPUG at python.org
** **> [4]https://mail.python.org/mailman/listinfo/trizpug
** **> [5]http://tripython.org is the Triangle Python Users Group
** **> Your code works fine for me. I can see the chart. Here're my
imports:
** **>
** **> import pandas as pd
** **> import numpy as np
** **> import matplotlib.pyplot as plt
** **> %matplotlib inline
** **>
** **> - Art.
** **>
** **> Art Nestsiarenka
** **> email: [6]artem.nesterenko at gmail.com
** **>
** **>
** **>
** **>
** **>
** **> On Mon, Jan 21, 2019 at 7:19 PM David Handy
<[7]david at handysoftware.com>
** **> wrote:
** **>
** **> > Hi Python / data science friends -
** **> >
** **> >
** **> >
** **> > I'm switching to use conda instead of pip, at least for this
** **particular
** **> > data science project. I installed pandas, ipython matplotlib,
and am
** **> > working through the pandas intro:
** **> > [8]http://pandas.pydata.org/pandas-docs/stable/10min.html
** **> >
** **> >
** **> >
** **> > Everything seems to be working fine except plotting:
** **> >
** **> >
** **> >
** **> > In [35]: ts = pd.Series(np.random.randn(1000),
** **> > index=pd.date_range('1/1/2000', p
** **> > ...: eriods=1000))
** **> >
** **> > In [36]: ts = ts.cumsum()
** **> >
** **> > In [37]: ts.plot()
** **> > Out[37]: <matplotlib.axes._subplots.AxesSubplot at
0x7f8c78066190>
** **> >
** **> >
** **> >
** **> > ... and that's it. No window pops up, nothing gets displayed.
** **> >
** **> >
** **> >
** **> > I'm running Fedora Linux.
** **> >
** **> >
** **> >
** **> > What basic thing am I missing? Was I supposed to install
something
** **> > related
** **> > to Tkinter to plot via tkinter?
** **> >
** **> >
** **> >
** **> > Thanks,
** **> >
** **> > David H
** **> >
** **> >
** **> > _______________________________________________
** **> > TriZPUG mailing list
** **> > [9]TriZPUG at python.org
** **> > [10]https://mail.python.org/mailman/listinfo/trizpug
** **> > [11]http://tripython.org is the Triangle Python Users Group
** **> >
** **> Your code works fine for me. I can see the chart. Here're my
imports:
** **> import pandas as pd
** **> import numpy as np
** **> import matplotlib.pyplot as plt
** **> %matplotlib inline
** **> - Art.
** **> Art Nestsiarenka
** **> email: [1][12]artem.nesterenko at gmail.com
** **>
** **> On Mon, Jan 21, 2019 at 7:19 PM David Handy
<[2][13]david at handysoftware.com>
** **> wrote:
** **>
** **> ** **Hi Python / data science friends -
** **>
** **> ** **I'm switching to use conda instead of pip, at least for this
** **> particular
** **> ** **data science project. I installed pandas, ipython
matplotlib, and
** **> am
** **> ** **working through the pandas intro:
** **> **
**[3][14]http://pandas.pydata.org/pandas-docs/stable/10min.html
** **>
** **> ** **Everything seems to be working fine except plotting:
** **>
** **> ** **In [35]: ts = pd.Series(np.random.randn(1000),
** **> ** **index=pd.date_range('1/1/2000', p
** **> ** ** ** **...: eriods=1000))
** **>
** **> ** **In [36]: ts = ts.cumsum()
** **>
** **> ** **In [37]: ts.plot()
** **> ** **Out[37]: <matplotlib.axes._subplots.AxesSubplot at
** **> 0x7f8c78066190>
** **>
** **> ** **... and that's it. No window pops up, nothing gets
displayed.
** **>
** **> ** **I'm running Fedora Linux.
** **>
** **> ** **What basic thing am I missing? Was I supposed to install
something
** **> related
** **> ** **to Tkinter to plot via tkinter?
** **>
** **> ** **Thanks,
** **>
** **> ** **David H
** **>
** **> _______________________________________________
** **> TriZPUG mailing list
** **> [4][15]TriZPUG at python.org
** **> [5][16]https://mail.python.org/mailman/listinfo/trizpug
** **> [6][17]http://tripython.org is the Triangle Python Users Group
** **>
** **> References
** **>
** **> Visible links
** **> 1. mailto:[18]artem.nesterenko at gmail.com
** **> 2. mailto:[19]david at handysoftware.com
** **> 3. [20]http://pandas.pydata.org/pandas-docs/stable/10min.html
** **> 4. mailto:[21]TriZPUG at python.org
** **> 5. [22]https://mail.python.org/mailman/listinfo/trizpug
** **> 6. [23]http://tripython.org/
** **>
_______________________________________________
TriZPUG mailing list
[24]TriZPUG at python.org
[25]https://mail.python.org/mailman/listinfo/trizpug
[26]http://tripython.org is the Triangle Python Users Group
--
[27]about.me/francois.dion - [28]www.pyptug.org -
[29]www.3DFutureTech.info - [30]@f_dion
References
Visible links
1. mailto:david at handysoftware.com
2. mailto:artem.nesterenko at gmail.com
3. mailto:TriZPUG at python.org
4. https://mail.python.org/mailman/listinfo/trizpug
5. http://tripython.org/
6. mailto:artem.nesterenko at gmail.com
7. mailto:david at handysoftware.com
8. http://pandas.pydata.org/pandas-docs/stable/10min.html
9. mailto:TriZPUG at python.org
10. https://mail.python.org/mailman/listinfo/trizpug
11. http://tripython.org/
12. mailto:artem.nesterenko at gmail.com
13. mailto:david at handysoftware.com
14. http://pandas.pydata.org/pandas-docs/stable/10min.html
15. mailto:TriZPUG at python.org
16. https://mail.python.org/mailman/listinfo/trizpug
17. http://tripython.org/
18. mailto:artem.nesterenko at gmail.com
19. mailto:david at handysoftware.com
20. http://pandas.pydata.org/pandas-docs/stable/10min.html
21. mailto:TriZPUG at python.org
22. https://mail.python.org/mailman/listinfo/trizpug
23. http://tripython.org/
24. mailto:TriZPUG at python.org
25. https://mail.python.org/mailman/listinfo/trizpug
26. http://tripython.org/
27. http://about.me/francois.dion
28. http://www.pyptug.org/
29. http://www.3dfuturetech.info/
30. http://twitter.com/f_dion
More information about the TriZPUG
mailing list