File indexing completed on 2024-12-22 04:17:10
0001 #!/usr/bin/python2.7 0002 import pykst as kst 0003 import time 0004 0005 0006 client=kst.Client("PlotLayoutDemo") 0007 0008 client.hide_window() 0009 0010 #autolayout in tab 1 0011 p1 = client.new_plot() 0012 0013 client.new_plot() 0014 client.new_plot() 0015 client.new_plot() 0016 client.new_plot() 0017 client.new_plot() 0018 client.new_plot() 0019 client.new_plot() 0020 client.new_plot() 0021 0022 client.cleanup_layout(3) 0023 0024 client.set_tab_text("First") 0025 0026 plots = client.get_plot_list() 0027 0028 # do something to every plot 0029 for plot in plots: 0030 plot.set_top_label(plot.name()) 0031 0032 0033 #p1.set_global_font(family = "Courier", font_size = 6) 0034 0035 # manual grid 0036 client.new_tab() 0037 client.set_tab_text("Second") 0038 0039 for x in [.125, 0.375, 0.625, 0.875]: 0040 for y in [.125, 0.375, 0.625, 0.875]: 0041 client.new_plot((x,y),(0.25,0.25)) 0042 0043 # subplot grid 0044 client.new_tab() 0045 client.set_tab_text("Third") 0046 0047 for i in xrange(1,26): 0048 p = client.new_plot(font_size = 8, auto_position = False) 0049 p.subplot(5,5,i) 0050 0051 client.show_window() 0052