@@ -402,16 +402,24 @@ def draw(self, filename=None):
402402 ax .legend (bbox_to_anchor = (1.05 , 1.0 ), loc = "upper left" )
403403
404404 plt .tight_layout ()
405- plt . show ( )
405+ show_or_save_plot ( filename )
406406
407407
408408class _FreeFormFinsPlots (_FinsPlots ):
409409 """Class that contains all free form fin plots."""
410410
411411 # pylint: disable=too-many-statements
412- def draw (self ):
413- """Draw the fin shape along with some important information, including
414- the center line, the quarter line and the center of pressure position.
412+ def draw (self , filename = None ):
413+ """Draw the fin shape along with some important information.
414+ These being: the center line and the center of pressure position.
415+
416+ Parameters
417+ ----------
418+ filename : str | None, optional
419+ The path the plot should be saved to. By default None, in which case
420+ the plot will be shown instead of saved. Supported file endings are:
421+ eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
422+ and webp (these are the formats supported by matplotlib).
415423
416424 Returns
417425 -------
@@ -469,7 +477,7 @@ def draw(self):
469477 ax .legend (bbox_to_anchor = (1.05 , 1.0 ), loc = "upper left" )
470478
471479 plt .tight_layout ()
472- plt . show ( )
480+ show_or_save_plot ( filename )
473481
474482
475483class _TailPlots (_AeroSurfacePlots ):
@@ -506,12 +514,12 @@ def all(self):
506514class _GenericSurfacePlots (_AeroSurfacePlots ):
507515 """Class that contains all generic surface plots."""
508516
509- def draw (self ):
517+ def draw (self , filename = None ):
510518 pass
511519
512520
513521class _LinearGenericSurfacePlots (_AeroSurfacePlots ):
514522 """Class that contains all linear generic surface plots."""
515523
516- def draw (self ):
524+ def draw (self , filename = None ):
517525 pass
0 commit comments