@@ -114,20 +114,25 @@ def draw_circle(ax, ccrs, p, col, nc=10, alpha=0.5):
114114 transform = ccrs )
115115
116116
117- def plot_enu (t , enu , smode = None , ztd = None , ylim = 1.0 , figtype = 1 ):
117+ def plot_enu (t , enu , smode = None , ztd = None , ylim = 1.0 , ylim_v = None , figtype = 1 ):
118118 """ plot ENU coordinates """
119119
120120 lbl_t = ['East [m]' , 'North [m]' , 'Up [m]' ]
121121 fmt = '%H:%M'
122122
123123 fig = plt .figure (figsize = [7 , 9 ])
124124 fig .set_rasterized (True )
125+ idx2 = np .array ([])
125126
126127 if smode is not None :
128+ idx2 = np .where (smode == 2 )[0 ] # dgps
127129 idx4 = np .where (smode == 4 )[0 ] # fix
128130 idx5 = np .where (smode == 5 )[0 ] # float
129131 idx0 = np .where (smode == 0 )[0 ] # none
130132
133+ if ylim_v is None :
134+ ylim_v = ylim
135+
131136 if figtype == 1 : # ENU versus t
132137
133138 nfig = 3 if ztd is None else 4
@@ -136,14 +141,19 @@ def plot_enu(t, enu, smode=None, ztd=None, ylim=1.0, figtype=1):
136141 plt .subplot (nfig , 1 , k + 1 )
137142 if smode is None :
138143 plt .plot (t , enu [:, k ])
144+ elif len (idx2 ) > 0 : # DGPS
145+ plt .plot (t [idx0 ], enu [idx0 , k ], 'r.' , label = 'none' )
146+ plt .plot (t [idx2 ], enu [idx2 , k ], 'y.' , label = 'dgps' )
139147 else :
140148 plt .plot (t [idx0 ], enu [idx0 , k ], 'r.' , label = 'none' )
141149 plt .plot (t [idx5 ], enu [idx5 , k ], 'y.' , label = 'float' )
142150 plt .plot (t [idx4 ], enu [idx4 , k ], 'g.' , label = 'fix' )
143151
144152 plt .ylabel (lbl_t [k ])
145153 plt .grid ()
146- plt .ylim ([- ylim , ylim ])
154+ lim = ylim_v if k == 2 else ylim
155+ plt .ylim ([- lim , lim ])
156+
147157 plt .gca ().xaxis .set_major_formatter (md .DateFormatter (fmt ))
148158
149159 if ztd is not None :
@@ -159,18 +169,21 @@ def plot_enu(t, enu, smode=None, ztd=None, ylim=1.0, figtype=1):
159169 markersize = 8 , label = 'fix' )
160170
161171 plt .ylabel ('ZTD [cm]' )
172+ plt .ylim ([0 , 40 ])
162173 plt .grid ()
163174 plt .gca ().xaxis .set_major_formatter (md .DateFormatter (fmt ))
164175
165- plt .xlabel ('Time [HH:MM]' )
166-
176+ plt .xlabel ('Time [HH:MM]' )
167177 plt .legend ()
168178
169179 elif figtype == 2 : # horizontal coordinates
170180 fig .add_subplot (111 )
171181
172182 if smode is None :
173183 plt .plot (enu [:, 0 ], enu [:, 1 ])
184+ elif idx2 is not None : # DGPS
185+ plt .plot (enu [idx0 , 0 ], enu [idx0 , 1 ], 'r.' , label = 'none' )
186+ plt .plot (enu [idx2 , 0 ], enu [idx2 , 1 ], 'y.' , label = 'dgps' )
174187 else :
175188 plt .plot (enu [idx0 , 0 ], enu [idx0 , 1 ], 'r.' , label = 'none' )
176189 plt .plot (enu [idx5 , 0 ], enu [idx5 , 1 ], 'y.' , label = 'float' )
0 commit comments