21
21
22
22
def longitudeconverter (longitudes ):
23
23
if longitudes [- 1 ] == 'W' :
24
- longitudes = float ('-' + longitudes [0 :- 1 ])
24
+ if longitudes [0 ] == '-' :
25
+ longitudes = float (longitudes [0 :- 1 ])
26
+ else :
27
+ longitudes = float ('-' + longitudes [0 :- 1 ])
25
28
else :
26
29
longitudes = float (longitudes [0 :- 1 ])
27
30
return longitudes
28
31
29
32
def latitudeconverter (latitudes ):
30
33
if latitudes [- 1 ] == 'S' :
31
- latitudes = float ('-' + latitudes [0 :- 1 ])
34
+ if latitudes [0 ] == '-' :
35
+ latitudes = float (latitiudes [0 :- 1 ])
36
+ else :
37
+ latitudes = float ('-' + latitudes [0 :- 1 ])
32
38
else :
33
39
latitudes = float (latitudes [0 :- 1 ])
34
40
return latitudes
@@ -78,7 +84,7 @@ def latitudeconverter(latitudes):
78
84
plt .subplot (121 )
79
85
plt .title (energysysname )
80
86
plt .gcf ().canvas .set_window_title ('ElectriCChain SunViewer v1.0' )
81
- plt .subplots_adjust (left = 0.06 , bottom = 0.13 , right = 0.9 , top = 0.9 )
87
+ plt .subplots_adjust (left = 0.06 , bottom = 0.25 , right = 0.9 , top = 0.9 )
82
88
plt .gca ().xaxis .set_major_formatter (mdates .DateFormatter ('%Y-%m-%d %H:%M:%S' ))
83
89
plt .gca ().xaxis .set_major_locator (mdates .AutoDateLocator ())
84
90
plt .plot (date , energyplot , 'bo' )
@@ -92,14 +98,14 @@ def latitudeconverter(latitudes):
92
98
plt .tick_params ('y' , colors = 'r' )
93
99
94
100
elif xaxischooser == 'blocks' :
95
- plt .figure (num = 1 , figsize = (16 , 12 ))
101
+ plt .figure (num = 1 , figsize = (10 , 8 ))
96
102
thismanager = plt .get_current_fig_manager ()
97
103
img = PhotoImage (file = 'elcc_logo.ppm' )
98
104
thismanager .window .tk .call ('wm' , 'iconphoto' , thismanager .window ._w , img )
99
105
plt .subplot (121 )
100
106
plt .title (energysysname )
101
107
plt .gcf ().canvas .set_window_title ('ElectriCChain SunViewer v1.0' )
102
- plt .subplots_adjust (left = 0.06 , bottom = 0.13 , right = 0.98 , top = 0.9 )
108
+ plt .subplots_adjust (left = 0.06 , bottom = 0.15 , right = 0.98 , top = 0.9 )
103
109
plt .plot (blocknumber , energyplot , 'bo' )
104
110
plt .ylabel ('TOTAL Energy MWh' , color = 'b' )
105
111
plt .tick_params ('y' , colors = 'b' )
0 commit comments