Menu

#8 Bug in PlotItems._TempFileItem (affects Win32)

open
nobody
None
5
2012-09-17
2006-11-17
No

PlotItems._TempFileItem.init sets filename instead of self.filename, so del fails, and graph sometime doesn't get drawn under Windows.

Also, remove below comment, since prefer_inline_data=1 doesn't work on windows when gnuplot is used to draw more than one graph (apparently randomly, some graphs don't get drawn when the info is piped).

Apparently gnuplot on windows can use inline data, but we use

non-inline data (i.e., temporary files) by default for no

special reason:

prefer_inline_data = 0

Discussion

  • Anonymous

    Anonymous - 2006-11-17

    Logged In: YES
    user_id=1345991
    Originator: YES

    Sorry didn't see the apply(_FileItem.init, (self, self.filename,), keyw) line

    Will try again to find out why only alternate graphs draw

     
  • Anonymous

    Anonymous - 2006-11-17

    Logged In: YES
    user_id=1345991
    Originator: YES

    I finally got it to work by removing the os.unlink(self.filename) line. It leaves some tmpfiles behind, but at least gnuplot doesn't barf from them getting deleted too soon.

     
  • Michael Haggerty

    Logged In: YES
    user_id=38106
    Originator: NO

    Please read Q1 in the FAQ and see if it answers your question about temporary files being deleted too soon.

     
  • Anonymous

    Anonymous - 2006-11-20

    Logged In: YES
    user_id=1345991
    Originator: YES

    Hmmm...

    Since prefer_inline_data=1 doesn't work properly with pgnuplot.exe, only available option there is to use time.sleep. Watching for output file creation shouldn't work since it's only written to later.

    I got gnuplot-py to work under cygwin, which has FIFO's - so you could recommend that as well in the FAQ. However I need gnuplot-py under Win32 since I'm using scipy for some things and there isn't pre-compiled scipy for cygwin.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.