home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- __all__ = [
- 'Gnuplot',
- 'gp',
- 'gp_new',
- 'Data',
- 'File',
- 'Func',
- 'GridData',
- 'pm3d_config',
- 'eps_fix_bbox']
- import os
- import tempfile
- import sys
- from IPython.genutils import getoutput
- tmpname = tempfile.mktemp()
- open(tmpname, 'w').write('set mouse')
- gnu_out = getoutput('gnuplot ' + tmpname)
- os.unlink(tmpname)
- if gnu_out:
- print '*** Your version of Gnuplot appears not to have mouse support.'
- gnuplot_mouse = 0
- else:
- gnuplot_mouse = 1
- del tmpname
- del gnu_out
- if os.name in ('nt', 'dos') or sys.platform == 'cygwin':
- gnuplot_persist = 0
- else:
- gnuplot_persist = 1
- import IPython.Gnuplot2 as Gnuplot
-
- class NotGiven:
- pass
-
-
- def gp_new(mouse = NotGiven, persist = NotGiven):
- if mouse is NotGiven:
- mouse = gnuplot_mouse
-
- if persist is NotGiven:
- persist = gnuplot_persist
-
- g = Gnuplot.Gnuplot(persist = persist)
- if mouse:
- g('set mouse')
-
- return g
-
- gp = gp_new()
- Data = Gnuplot.Data
- File = Gnuplot.File
- Func = Gnuplot.Func
- String = Gnuplot.String
- GridData = Gnuplot.GridData
- eps_fix_bbox = Gnuplot.eps_fix_bbox
- pm3d_config = '\nset pm3d solid\nset hidden3d\nunset surface\nset isosamples 50\n'
-