def _do_title_string(self,title_items,cycle):
'''
Create title string
Private method that creates a title string for a cycle plot
out of a list of title_items that are cycle attributes and can
be obtained with self.get
Parameters
----------
title_items : list
A list of cycle attributes.
cycle : scalar
The cycle for which the title string should be created.
Returns
-------
title_string: string
Title string that can be used to decorate plot.
'''
title_string=[]
form_str='%4.1F'
for item in title_items:
num=self.get(item,fname=cycle)
if num > 999:
num=log10(num)
prefix='log '
else:
prefix=''
title_string.append(prefix+item+'='+form_str%num)
tt=''
for thing in title_string:
tt = tt+thing+", "
return tt.rstrip(', ')
评论列表
文章目录