aboutsummaryrefslogtreecommitdiffstats
path: root/other/ipython_log.py
diff options
context:
space:
mode:
Diffstat (limited to 'other/ipython_log.py')
-rw-r--r--other/ipython_log.py101
1 files changed, 101 insertions, 0 deletions
diff --git a/other/ipython_log.py b/other/ipython_log.py
new file mode 100644
index 0000000..fa1fd29
--- /dev/null
+++ b/other/ipython_log.py
@@ -0,0 +1,101 @@
+#log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE ***
+#log# DO NOT CHANGE THIS LINE OR THE TWO BELOW
+#log# opts = Struct({'__allownew': True,
+ 'c': '\nimport sage.misc.misc; print sage.misc.misc.branch_current_hg_notice(sage.misc.misc.branch_current_hg()); from sage.misc.interpreter import preparser; preparser(True);import sage.all_cmdline; sage.all_cmdline._init_cmdline(globals());from sage.all import Integer, RealNumber;import os; os.chdir("/home/bnewbold/thesis/other");import sage.misc.interpreter;from sage.misc.interpreter import attached_files;from sage.all_cmdline import *;_=sage.misc.interpreter.load_startup_file("/home/bnewbold/.sage//init.sage");',
+ 'logfile': 'ipython_log.py'})
+#log# args = []
+#log# It is safe to make manual edits below here.
+#log#-----------------------------------------------------------------------
+import sage.misc.misc; print sage.misc.misc.branch_current_hg_notice(sage.misc.misc.branch_current_hg()); from sage.misc.interpreter import preparser; preparser(True);import sage.all_cmdline; sage.all_cmdline._init_cmdline(globals());from sage.all import Integer, RealNumber;import os; os.chdir("/home/bnewbold/thesis/other");import sage.misc.interpreter;from sage.misc.interpreter import attached_files;from sage.all_cmdline import *;_=sage.misc.interpreter.load_startup_file("/home/bnewbold/.sage//init.sage");
+
+
+from pylab import *
+
+d = loadtxt('./huge-output.data')
+plot(d)
+d
+d = d[Integer(0)]
+d
+d = loadtxt('./huge-output.data')
+transpose(d)
+d = transpose(d)
+d = transpose(d)
+#?plot
+
+d
+d = transpose(d)
+d
+p = plot(d[Integer(0)],d[Integer(1)],'b.')
+p
+show(p)
+p
+p = p[Integer(0)]
+p
+show(p)
+_ip.system("rm huge-output.png")
+savefig('huge-output.png')
+d
+max(d[Integer(0)])
+xrange([-Integer(1),Integer(1)])
+#?xrange
+p
+p.xaxis()
+f = figure()
+gca()
+a = gca()
+a.xaxis
+a.xaxis()
+#?a.set_xlim
+#?a.set_xlim
+a.set_xlim((-Integer(1),Integer(1)))
+a.set_ylim((-Integer(1),Integer(1)))
+savefig('huge-output.png')
+p = plot(d[Integer(0)],d[Integer(1)],'b.')
+savefig('huge-output.png')
+a = gca()
+a.set_ylim((-Integer(1),Integer(1)))
+a.set_xlim((-Integer(1),Integer(1)))
+min(d[Integer(0)])
+max(d[Integer(0)])
+min(d[Integer(1)])
+max(d[Integer(1)])
+size(d)
+d
+mean(d)
+mean(d[Integer(0)])
+median(d[Integer(0)])
+median(d[Integer(1)])
+p = plot(d[Integer(0)][:Integer(10)],d[Integer(1)][:Integer(10)],'k.')
+savefig('huge-output.png')
+a = gca()
+a.set_xlim((-Integer(1),Integer(1)))
+a.set_ylim((-Integer(1),Integer(1)))
+savefig('huge-output.png')
+#?plot
+figure()
+plot(d[Integer(0)],d[Integer(1)],'k',markersize=RealNumber('.0001'))
+def doaxes(): a = gca(); a.set_xlim((-Integer(1),Integer(1))); a.set_ylim((-Integer(1),Integer(1)));
+
+doaxes()
+savefig('huge-output.png')
+#?savefig
+savefig('huge-output.png', dpi=Integer(1000))
+savefig('huge-output.png', dpi=Integer(200))
+savefig('huge-output.png', dpi=Integer(200), format='png')
+#?savefig
+savefig('huge-output.png')
+a = gca()
+a.set_xlim[-RealNumber('.001'),RealNumber('.001')]
+a.set_xlim((-RealNumber('.001'),RealNumber('.001')))
+savefig('huge-output.png')
+figure()
+plot(d[Integer(0)][Integer(5000)],d[Integer(1)][Integer(5000)],'k',markersize=Integer(1))
+plot(d[Integer(0)][Integer(5000)],d[Integer(1)][Integer(5000)],'k',markersize=Integer(1))
+d
+size(d)
+size(d[Integer(0)])
+size(d[Integer(1)])
+plot(d[Integer(0)][Integer(5000)],d[Integer(1)][Integer(5000)],'k',markersize=RealNumber('.1'))
+_ip.magic("logon ")
+_ip.magic("logstart ")
+