Skip to content
Snippets Groups Projects
Commit 29a088d2 authored by Nils Brüggemann's avatar Nils Brüggemann
Browse files

pyic_fig.py: Added option to show full time string.

parent 916f0924
No related branches found
No related tags found
No related merge requests found
Pipeline #31275 passed
......@@ -82,7 +82,7 @@ parser.add_argument('--title_center', type=str, default='auto',
parser.add_argument('--title_left', type=str, default='auto',
help='Title string left.')
parser.add_argument('--title_right', type=str, default='auto',
help='Title string right.')
help='Title string right. Use --title-right="full_time" for time str without rounding.')
parser.add_argument('--xlabel', type=str, default='',
help='String for xlabel.')
parser.add_argument('--ylabel', type=str, default='',
......@@ -322,6 +322,9 @@ if (iopts.title_right=='auto') and ('time' in ds[var].dims):
#tstr = tstr.split('T')[0].replace('-', '')+'T'+tstr.split('T')[1].split('.')[0].replace(':','')+'Z'
tstr = tstr.split('.')[0]
iopts.title_right = tstr
elif (iopts.title_right=='full_time') and ('time' in ds[var].dims):
tstr = str(data.time.data)
iopts.title_right = tstr
if (iopts.title_center=='auto'):
iopts.title_center = ''
if (iopts.title_left=='auto') and (depth_name!='none'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment