本文整理汇总了Python中param.parameterized.ParamOverrides.title方法的典型用法代码示例。如果您正苦于以下问题:Python ParamOverrides.title方法的具体用法?Python ParamOverrides.title怎么用?Python ParamOverrides.title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类param.parameterized.ParamOverrides
的用法示例。
在下文中一共展示了ParamOverrides.title方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __call__
# 需要导入模块: from param.parameterized import ParamOverrides [as 别名]
# 或者: from param.parameterized.ParamOverrides import title [as 别名]
def __call__(self,**params):
p=ParamOverrides(self,params)
sheet = p.sheet
for coordinate in p.coords:
i_value,j_value=sheet.sheet2matrixidx(coordinate[0],coordinate[1])
pylab.figure(figsize=(7,7))
isint=pylab.isinteractive()
pylab.ioff()
pylab.ylabel('Response',fontsize='large')
pylab.xlabel('%s (%s)' % (p.x_axis.capitalize(),p.unit),fontsize='large')
pylab.title('Sheet %s, coordinate(x,y)=(%0.3f,%0.3f) at time %s' %
(sheet.name,coordinate[0],coordinate[1],topo.sim.timestr()))
p.title='%s: %s Tuning Curve' % (topo.sim.name,p.x_axis.capitalize())
self.first_curve=True
for curve_label in sorted(sheet.curve_dict[p.x_axis].keys()):
x_values,y_values,ticks=self._curve_values(i_value,j_value,sheet.curve_dict[p.x_axis][curve_label])
x_tick_values,ticks = self._reduce_ticks(ticks)
labels = [self._format_x_tick_label(x) for x in ticks]
pylab.xticks(x_tick_values, labels,fontsize='large')
pylab.yticks(fontsize='large')
p.plot_type(x_values, y_values, label=curve_label,lw=3.0)
self.first_curve=False
if isint: pylab.ion()
if p.legend: pylab.legend(loc=2)
self._generate_figure(p)
示例2: __call__
# 需要导入模块: from param.parameterized import ParamOverrides [as 别名]
# 或者: from param.parameterized.ParamOverrides import title [as 别名]
def __call__(self, **params):
p=ParamOverrides(self,params)
name=p.plot_template.keys().pop(0)
plot=make_template_plot(p.plot_template,
p.sheet.views.Maps, p.sheet.xdensity,p.sheet.bounds,
p.normalize,name=p.plot_template[name])
fig = plt.figure(figsize=(5,5))
if plot:
bitmap=plot.bitmap
isint=plt.isinteractive() # Temporarily make non-interactive for plotting
plt.ioff() # Turn interactive mode off
plt.imshow(bitmap.image,origin='lower',interpolation='nearest')
plt.axis('off')
for (t,pref,sel,c) in p.overlay:
v = plt.flipud(p.sheet.views.Maps[pref].view()[0])
if (t=='contours'):
plt.contour(v,[sel,sel],colors=c,linewidths=2)
if (t=='arrows'):
s = plt.flipud(p.sheet.views.Maps[sel].view()[0])
scale = int(np.ceil(np.log10(len(v))))
X = np.array([x for x in xrange(len(v)/scale)])
v_sc = np.zeros((len(v)/scale,len(v)/scale))
s_sc = np.zeros((len(v)/scale,len(v)/scale))
for i in X:
for j in X:
v_sc[i][j] = v[scale*i][scale*j]
s_sc[i][j] = s[scale*i][scale*j]
plt.quiver(scale*X, scale*X, -np.cos(2*np.pi*v_sc)*s_sc,
-np.sin(2*np.pi*v_sc)*s_sc, color=c,
edgecolors=c, minshaft=3, linewidths=1)
p.title='%s overlaid with %s at time %s' %(plot.name,pref,topo.sim.timestr())
if isint: plt.ion()
p.filename_suffix="_"+p.sheet.name
self._generate_figure(p)
return fig