matplotlib pylab plot() BadWindow error

Discussion in 'Python' started by oyinbo55, May 4, 2008.

  1. oyinbo55

    oyinbo55 Guest

    I am trying to use the pylab plot command on my laptop running Ubuntu
    6.06 (Dapper). Although the plot command works fine on my XP desktop
    at work, I cannot open the plot window on the laptop. I edited
    matplotlibrc to change interactive: to "True". In idle, I entered the
    commands:
    >>> from pylab import *
    >>> plot([1,2,3])


    The terminal window closed abruptly when I typed the closing
    parenthesis.
    I have been warned not to use the show() command in interactive mode.
    I tried:
    oyinbo@oyinbo-laptop:~$ idle-python2.4 -n
    In idle -n, I entered the sam two commands. This time I got an error
    message:
    The program 'idle-python2.4' received an X Window System error.
    This probably reflects a bug in the program.
    The error was 'BadWindow (invalid Window parameter)'.
    (Details: serial 2875 error_code 3 request_code 15 minor_code
    0)
    (Note to programmers: normally, X errors are reported
    asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error()
    function.)

    Using the Python prompt without idle, I got no error message, but the
    window simply didn't open:

    oyinbo@oyinbo-laptop:~$ python
    Python 2.4.3 (#2, Mar 7 2008, 01:58:20)
    [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
    Type "help", "copyright", "credits" or "license" for more
    information.
    >>> from pylab import *
    >>> plot([1,2,3])

    [<matplotlib.lines.Line2D instance at 0xb7bf04cc>]

    Have I skipped a step?

    Thanks for all the great information on your group.

    Bill
    oyinbo55, May 4, 2008
    #1
    1. Advertising

  2. oyinbo55

    three3q Guest

    Hi,

    > I have been warned not to use the show() command in interactive mode.


    I can't find the error but had better luck with interactivePython ipython which shippes with a
    pylab-friendly option.

    dan
    three3q, Jun 28, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dr. Colombes
    Replies:
    1
    Views:
    1,016
    John Hunter
    Feb 10, 2005
  2. Dr. Colombes
    Replies:
    3
    Views:
    652
    John Hunter
    Feb 23, 2005
  3. Jan Wienhausen

    pylab: plot update

    Jan Wienhausen, May 11, 2005, in forum: Python
    Replies:
    1
    Views:
    669
    Skip Montanaro
    May 11, 2005
  4. bdb112
    Replies:
    2
    Views:
    2,572
    Carl Banks
    Oct 20, 2009
  5. Matplotlib/Pylab Error

    , Dec 10, 2012, in forum: Python
    Replies:
    3
    Views:
    227
    Mark Lawrence
    Dec 12, 2012
Loading...

Share This Page