本文整理汇总了Python中plot.Plot.setFigure方法的典型用法代码示例。如果您正苦于以下问题:Python Plot.setFigure方法的具体用法?Python Plot.setFigure怎么用?Python Plot.setFigure使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plot.Plot
的用法示例。
在下文中一共展示了Plot.setFigure方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from plot import Plot [as 别名]
# 或者: from plot.Plot import setFigure [as 别名]
#.........这里部分代码省略.........
"""
# Provides a simple interface to extension, useful e.g. for diagnostics.
"""
# Re-initialize parameters, grid and state
self.Params = Parameters(**kwargs)
self.State = State(self, **kwargs)
self.Grid = self.State.Grid
# Bring diagnostics up to date
self.compute()
def write(self):
"""
Invokes write method of IO instance to write out current State
"""
self.Io.writeOutput(self.Params, self.State)
def open(self, OutputFileName='CliMT.nc'):
"""
"""
if self.Io.OutputFileName == OutputFileName:
print '\n +++ ClimT.Io: File %s is currently open for output'% OutputFileName
return
else:
print 'Opening %s for output'% OutputFileName
self.Io.OutputFileName = OutputFileName
self.Io.DoingOutput = True
self.Io.Appending = False
self.Io.OutputTimeIndex = 0
self.Io.createOutputFile(self.State, self.Params)
def plot(self, *FieldKeys):
self.Plot(self, *FieldKeys)
def setFigure(self, FigureNumber=None):
self.Plot.setFigure(FigureNumber)
def closeFigure(self, FigureNumber=None):
self.Plot.closeFigure(FigureNumber)
def usage(self):
print self.__doc__
def report(self):
print 'CliMT component:\n %s' % self.Name
keys = self.State.keys()
keys1 = []
for i in range(len(keys)):
if keys[i] in self.Prognostic: keys1.append('%12s %s' % (keys[i],'(prognostic)'))
for i in range(len(keys)):
if keys[i] in self.Diagnostic: keys1.append('%12s %s' % (keys[i],'(diagnostic)'))
for i in range(len(keys)):
if keys[i] not in self.Prognostic and keys[i] not in self.Diagnostic:
keys1.append('%12s %s' % (keys[i],'(Fixed)'))
print 'State variables:\n %s' % '\n '.join( keys1 )
def _checkUnused(self,kwargs):
'''
Notify of unused input quantities.
'''
unused = []
io_keys = ['RestartFile','OutputFile','OutputFreq','OutputFields','ElapsedTime']
monitor_keys = ['MonitorFields','MonitorFreq']
for key in kwargs:
if key not in self.Params \
and key not in self.Grid \
and key not in KnownFields \