File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ from __future__ import unicode_literals
12from mpl_toolkits .basemap import Basemap
23import numpy as np
34import matplotlib .pyplot as plt
@@ -15,7 +16,7 @@ def lat2str(deg):
1516 deg += 1.0
1617 min -= 60.0
1718 dir = 'S'
18- return (u "%d\N{DEGREE SIGN} %g' %s" ) % (np .abs (deg ),np .abs (min ),dir )
19+ return ("%d\N{DEGREE SIGN} %g' %s" ) % (np .abs (deg ),np .abs (min ),dir )
1920
2021def lon2str (deg ):
2122 min = 60 * (deg - np .floor (deg ))
@@ -26,7 +27,7 @@ def lon2str(deg):
2627 deg += 1.0
2728 min -= 60.0
2829 dir = 'W'
29- return (u "%d\N{DEGREE SIGN} %g' %s" ) % (np .abs (deg ),np .abs (min ),dir )
30+ return ("%d\N{DEGREE SIGN} %g' %s" ) % (np .abs (deg ),np .abs (min ),dir )
3031
3132# (1) use matplotlib custom tick formatter
3233# instead of Basemap labelling methods.
Original file line number Diff line number Diff line change 11from __future__ import print_function
2+ from __future__ import unicode_literals
23# this example reads today's numerical weather forecasts
34# from the NOAA OpenDAP servers and makes a multi-panel plot.
45# This version demonstrates the use of the AxesGrid toolkit.
100101 ax .set_title ('%d-h forecast valid ' % fcsthr + verifdates [nt ],fontsize = 9 )
101102# figure title
102103plt .figtext (0.5 ,0.95 ,
103- u "2-m temp (\N{DEGREE SIGN} C) forecasts from %s"% verifdates [0 ],
104+ "2-m temp (\N{DEGREE SIGN} C) forecasts from %s" % verifdates [0 ],
104105 horizontalalignment = 'center' ,fontsize = 14 )
105106# a single colorbar.
106107cbar = fig .colorbar (cs , cax = grid .cbar_axes [0 ], orientation = 'horizontal' )
You can’t perform that action at this time.
0 commit comments