@@ -166,7 +166,9 @@ def __init__(
166166 # assign geographic region in format for PyGMT to need for mixing projected and
167167 # geographic plotting elements
168168 if self .epsg in ("3031" , "3413" ):
169- self .reg_latlon = "/" .join (map (str , self .reg )) + "/+ue" # codespell:ignore ue
169+ self .reg_latlon = (
170+ "/" .join (map (str , self .reg )) + "/+ue"
171+ ) # codespell:ignore ue
170172 # self.reg_latlon = (*self.reg, "+ue", "") # codespell:ignore ue
171173 else :
172174 # # option 1: region from grid file
@@ -198,14 +200,15 @@ def __init__(
198200 input_crs = self .epsg ,
199201 output_crs = "EPSG:4326" ,
200202 )
201- self .reg_latlon = f"{ ll_lonlat [0 ]} /{ ll_lonlat [1 ]} /{ ur_lonlat [0 ]} /{ ur_lonlat [1 ]} +r"
203+ self .reg_latlon = (
204+ f"{ ll_lonlat [0 ]} /{ ll_lonlat [1 ]} /{ ur_lonlat [0 ]} /{ ur_lonlat [1 ]} +r"
205+ )
202206
203207 # option 3: projected region with +ue
204208 # doesn't work with EPSG or PROJ string, but works with Stereographic projections
205209 # self.reg_latlon = "/".join(map(str, self.reg)) + "/+ue" # codespell:ignore ue
206210 # self.reg_latlon = (*self.reg, "+ue", "") # codespell:ignore ue
207211
208-
209212 def shift_figure (
210213 self ,
211214 origin_shift : str | None = None ,
@@ -1130,7 +1133,9 @@ def plot_inset(inset_reg, self, kwargs):
11301133 input_crs = self .epsg ,
11311134 output_crs = "EPSG:4326" ,
11321135 )
1133- inset_reg_latlon = f"{ ll_lonlat [0 ]} /{ ll_lonlat [1 ]} /{ ur_lonlat [0 ]} /{ ur_lonlat [1 ]} +r"
1136+ inset_reg_latlon = (
1137+ f"{ ll_lonlat [0 ]} /{ ll_lonlat [1 ]} /{ ur_lonlat [0 ]} /{ ur_lonlat [1 ]} +r"
1138+ )
11341139
11351140 print (inset_reg )
11361141 print (inset_reg_latlon )
@@ -1140,7 +1145,7 @@ def plot_inset(inset_reg, self, kwargs):
11401145 region = inset_reg_latlon ,
11411146 land = "grey" ,
11421147 shorelines = f"1/{ kwargs .get ('inset_coast_pen' , '0.2p,black' )} " ,
1143- verbose = "error"
1148+ verbose = "error" ,
11441149 )
11451150
11461151 box = self .reg
@@ -1151,7 +1156,7 @@ def plot_inset(inset_reg, self, kwargs):
11511156 region = inset_reg ,
11521157 # projection=self.proj_latlon, # doesn't work
11531158 # projection=self.proj, # doesn't work
1154- projection = "x?" # auto determine region from inset width
1159+ projection = "x?" , # auto determine region from inset width
11551160 )
11561161 return self
11571162
@@ -1183,15 +1188,12 @@ def plot_inset(inset_reg, self, kwargs):
11831188 else :
11841189 self = plot_inset (inset_reg , self , kwargs )
11851190
1186-
11871191 # reset region and projection for main map
11881192 # self.basemap(region=self.reg, projection=self.proj, frame="+t")
11891193
11901194 # msg = "`add_inset` only supports EPSG:3031 and EPSG:3413"
11911195 # raise NotImplementedError(msg)
11921196
1193-
1194-
11951197 def add_scalebar (
11961198 self ,
11971199 ** kwargs : typing .Any ,
0 commit comments