0

I have the following code which is regular for anyone who would like to make a plot with pandas in IPython.

In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: import matplotlib.pyplot as plt
In [4]: %matplotlib inline

Here it pops up an error:

UsageError: Invalid GUI request u'inline', valid ones are: pyglet, osx, qt5, qt, glut, gtk, gtk3, tk, wx

I read this post Run python script in IPython with inline / embedded plots

and found the two methods to get around:

ipython qtconsole --matplotlib inline -m example_plots

or

ipython qtconsole --pylab inline -m example_plots

But none of them works in my situation (I actually got stuck in iPython without making a plot, needless to say a plot embedded within a script.)

I am not sure where went wrong as %matplotlib inline used to work. I am using python 2.7.11 and IPython 4.2.0 if this information helps.

Thank you very much for your help.

Community
  • 1
  • 1
achimneyswallow
  • 896
  • 1
  • 12
  • 29

0 Answers0