File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -219,17 +219,14 @@ def plot_horiz_field( # noqa: C901
219219 ax .set_xlabel ('x (km)' )
220220 ax .set_ylabel ('y (km)' )
221221 ax .set_aspect ('equal' )
222- ax .autoscale (tight = True )
223-
224- # uncomment below once mosaic can mirror patches across periodic axis:
225- # --------------------------------------------------------------------
226- # if descriptor.is_periodic:
227- # if descriptor.x_period and not descriptor.y_period:
228- # ax.autoscale(axis='y', tight=True)
229- # elif not descriptor.x_period and descriptor.y_period:
230- # ax.autoscale(axis='x', tight=True)
231- # else:
232- # ax.autoscale(axis='both', tight=True)
222+
223+ if descriptor .is_periodic :
224+ if descriptor .x_period and not descriptor .y_period :
225+ ax .autoscale (axis = 'y' , tight = True )
226+ elif not descriptor .x_period and descriptor .y_period :
227+ ax .autoscale (axis = 'x' , tight = True )
228+ else :
229+ ax .autoscale (axis = 'both' , tight = True )
233230
234231 # scale ticks to be in kilometers
235232 ax .xaxis .set_major_formatter (lambda x , pos : f'{ x / 1e3 :g} ' )
You can’t perform that action at this time.
0 commit comments