当前位置: 首页>>代码示例>>Python>>正文


Python SubplotZero.set_title方法代码示例

本文整理汇总了Python中mpl_toolkits.axes_grid.axislines.SubplotZero.set_title方法的典型用法代码示例。如果您正苦于以下问题:Python SubplotZero.set_title方法的具体用法?Python SubplotZero.set_title怎么用?Python SubplotZero.set_title使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mpl_toolkits.axes_grid.axislines.SubplotZero的用法示例。


在下文中一共展示了SubplotZero.set_title方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run

# 需要导入模块: from mpl_toolkits.axes_grid.axislines import SubplotZero [as 别名]
# 或者: from mpl_toolkits.axes_grid.axislines.SubplotZero import set_title [as 别名]
    def run(self, results):
        par = self.getValueOfParameter("parameter")
        i = int(self.getValueOfParameter("iteration number"))
        title = self.getValueOfParameter("title")

        if(par==""):
            return False
        
        if(i >= results.__len__()):
            return False
        
        dialogform = Dialog(QApplication.activeWindow())
        fig = Figure((5.0, 4.0), dpi=100)
        ax = SubplotZero(fig, 1, 1, 1)
        fig.add_subplot(ax)

        for n in ["top", "right"]:
            ax.axis[n].set_visible(False)
            
        for n in ["bottom", "left"]:
            ax.axis[n].set_visible(True)
        
        x = results[i].getResults(par)   
        
        if(not(x.__len__())):
            return False
        
        ax.boxplot(x, notch=0, sym='+', vert=1, whis=1.5)
        
        ax.set_title(title)
        dialogform.showFigure(fig)
        return True
开发者ID:iut-ibk,项目名称:Calimero,代码行数:34,代码来源:libresulthandler.py

示例2: main

# 需要导入模块: from mpl_toolkits.axes_grid.axislines import SubplotZero [as 别名]
# 或者: from mpl_toolkits.axes_grid.axislines.SubplotZero import set_title [as 别名]
def main(path, name):
  from numpy import linspace, loadtxt
  d = SimulatedData(path) 
  psth = d.spike_time.psth()
  
  from mpl_toolkits.axes_grid.axislines import SubplotZero
  import matplotlib.pyplot as plt
  
  f1 = plt.figure(figsize=[6,8])
  ax = SubplotZero(f1, 411)
  f1.add_subplot(ax)  
  psth.plot_raster(ax)
  
  ax = SubplotZero(f1, 412)
  f1.add_subplot(ax)
  psth.plot_rate(ax, smoothed=True)
  
  ax = SubplotZero(f1, 413)
  f1.add_subplot(ax)
  dat = loadtxt(d.path['ML response'])
  t = linspace(0, 5000, dat.size)
  ax.plot(t, dat, 'k')
  for direction in ["left", "right", "top", "bottom"]:
    ax.axis[direction].set_visible(False)
  logging.info(str(dir(ax.axis["bottom"])))
#  ax.axis["bottom"].major_ticklabels=[]
  ax.set_title("ML")
  
  ax = SubplotZero(f1, 414)
  f1.add_subplot(ax)
  dat = loadtxt(d.path['HHLS response'])
  t = linspace(0, 5000, dat.size)
  ax.plot(t, dat, 'k')
  for direction in ["left", "right", "top"]:
    ax.axis[direction].set_visible(False)
  ax.axis["bottom"].set_label("Time (ms)")
  ax.set_title("HHLS")
  
  f1.subplots_adjust(hspace=0.47, top=0.95, bottom=0.05)
  
  f2 = plt.figure(figsize=[4,4])
  ax = SubplotZero(f2, 111)
  f2.add_subplot(ax)
  mf = psth.hist_mean_rate(ax, bins=linspace(0,8,20))
  ax.set_title({"highvar": "High variance", "lowvar": "Low variance"}[name])
  print "Mean firing rate =", mf.mean(), "Hz", "(", mf.std(),")"
  plt.show()
开发者ID:shhong,项目名称:simple_two_layer_network,代码行数:49,代码来源:raster.py

示例3: SubplotZero

# 需要导入模块: from mpl_toolkits.axes_grid.axislines import SubplotZero [as 别名]
# 或者: from mpl_toolkits.axes_grid.axislines.SubplotZero import set_title [as 别名]
                fontsize=16, fontweight='demibold',
                transform=ax.transAxes)

        plotting.remove_axis_junk(ax)
        t = np.arange(p_net.shape[1])*PSET.dt*PSET.decimate_q
        inds = (t >= T[0]) & (t <= T[1])
        ax.plot(t[inds], p_net[i, inds], 'k', lw=1)
        ax.set_ylabel(ylabel)
        ax.set_xticklabels([])
        


    # panel F. Illustration of 4-sphere volume conductor model geometry
    ax = SubplotZero(fig, gs[2, 1])
    fig.add_subplot(ax)
    ax.set_title('four-sphere volume conductor model')

    for direction in ["xzero"]:
        ax.axis[direction].set_visible(True)

    for direction in ["left", "right", "bottom", "top"]:
        ax.axis[direction].set_visible(False)

    
    theta = np.linspace(0, np.pi, 31)
    
    # draw some circles:
    for i, r, label in zip(range(4), PSET.foursphereParams['radii'], ['brain', 'CSF', 'skull', 'scalp']):
        ax.plot(np.cos(theta)*r, np.sin(theta)*r, 'C{}'.format(i), label=label + r', $r_%i=%i$ mm' % (i+1, r / 1000), clip_on=False)
    
    # draw measurement points
开发者ID:torbjone,项目名称:LFPy,代码行数:33,代码来源:figure_5.py

示例4: SubplotZero

# 需要导入模块: from mpl_toolkits.axes_grid.axislines import SubplotZero [as 别名]
# 或者: from mpl_toolkits.axes_grid.axislines.SubplotZero import set_title [as 别名]
ax1 = fig.add_subplot(gs[:6, 1], aspect='equal') # dipole moment ill.
ax1.axis('off')
ax1.set_title('extracellular potential')
ax2 = fig.add_subplot(gs[:6, 2], aspect='equal') # dipole moment ill.
ax2.axis('off')
ax2.set_title('magnetic field')
# ax3 = fig.add_subplot(gs[0, 3], aspect='equal')             # spherical shell model ill.
# ax3.set_title('4-sphere volume conductor')
# ax4 = fig.add_subplot(gs[1, 3],
                      # aspect='equal'
                      # )                 # MEG/EEG forward model ill.
# ax4.set_title('EEG and MEG signal detection')

ax3 = SubplotZero(fig, gs[7:, 0])
fig.add_subplot(ax3)
ax3.set_title('4-sphere volume conductor', verticalalignment='bottom')
ax4 = fig.add_subplot(gs[7:, 1]) # EEG
ax4.set_title('scalp electric potential $\phi_\mathbf{p}(\mathbf{r})$')
ax5 = fig.add_subplot(gs[7:, 2], sharey=ax4) # MEG
# ax5.set_title('scalp magnetic field')

#morphology - line sources for panels A and B
zips = []
xz = cell.get_idx_polygons()
for x, z in xz:
    zips.append(zip(x, z))
for ax in [ax0]:
    polycol = PolyCollection(zips,
                             linewidths=(0.5),
                             edgecolors='k',
                             facecolors='none',
开发者ID:torbjone,项目名称:LFPy,代码行数:33,代码来源:figure_2.py


注:本文中的mpl_toolkits.axes_grid.axislines.SubplotZero.set_title方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。