@@ -196,8 +196,8 @@ def _export_spline_field(spline, svg_element, box_min_x, box_max_y, **kwargs):
196
196
showable = sampled_spline .showable ()
197
197
198
198
# Discretize colors
199
- if kwargs .get ("n_colors" , None ) is not None :
200
- n_colors = kwargs .get ("n_colors" , None )
199
+ if kwargs .get ("n_colors" ) is not None :
200
+ n_colors = kwargs .get ("n_colors" )
201
201
cmap_key = spline .show_options .get ("cmap" , "jet" )
202
202
vmin = kwargs .get ("vmin" , spline .show_options .get ("vmin" , None ))
203
203
vmax = kwargs .get ("vmax" , spline .show_options .get ("vmax" , None ))
@@ -307,7 +307,7 @@ def _export_gustaf_object(
307
307
)
308
308
309
309
# Set text options
310
- if kwargs .get ("font_family" , None ) is not None :
310
+ if kwargs .get ("font_family" ) is not None :
311
311
svg_labels .attrib ["font-family" ] = kwargs ["font_family" ]
312
312
313
313
svg_labels .attrib ["font-size" ] = str (kwargs .get ("font_size" , 0.1 ))
@@ -479,7 +479,7 @@ def _export_control_mesh(
479
479
)
480
480
481
481
# Set text options
482
- if kwargs .get ("font_family" , None ) is not None :
482
+ if kwargs .get ("font_family" ) is not None :
483
483
svg_control_point_ids .attrib ["font-family" ] = kwargs ["font_family" ]
484
484
svg_control_point_ids .attrib ["font-size" ] = str (
485
485
kwargs .get ("font_size" , 0.1 )
@@ -746,7 +746,7 @@ def _add_scalar_bar(svg_element, box_size, **kwargs):
746
746
)
747
747
748
748
# Set text options
749
- if kwargs .get ("font_family" , None ) is not None :
749
+ if kwargs .get ("font_family" ) is not None :
750
750
svg_tick_labels .attrib ["font-family" ] = kwargs ["font_family" ]
751
751
svg_tick_labels .attrib ["font-size" ] = str (
752
752
kwargs .get ("scalarbar_font_size" , stroke_width * 20 )
@@ -1305,8 +1305,8 @@ def export(
1305
1305
scalarbar_offset = kwargs ["scalarbar_offset" ]
1306
1306
# Check if required arguments have been passed
1307
1307
if scalarbar and (
1308
- (kwargs .get ("vmin" , None ) is None )
1309
- or (kwargs .get ("vmax" , None ) is None )
1308
+ (kwargs .get ("vmin" ) is None )
1309
+ or (kwargs .get ("vmax" ) is None )
1310
1310
):
1311
1311
raise ValueError (
1312
1312
"`vmin` and `vmax` must be passed alon with scalarbar to ensure"
0 commit comments