@@ -321,7 +321,7 @@ def pygmtlogo(
321321 color
322322 ``True`` for a color logo, and ``False`` for a black and white logo.
323323 position
324- Position of the GMT logo on the plot. It can be specified in multiple ways:
324+ Position of the PyGMT logo on the plot. It can be specified in multiple ways:
325325
326326 - A :class:`pygmt.params.Position` object to fully control the reference point,
327327 anchor point, and offset.
@@ -370,19 +370,22 @@ def pygmtlogo(
370370 >>> fig.pygmtlogo(wordmark="horizontal", position="BR", height="1c")
371371 >>> fig.show()
372372 """
373+ # Validate shape, theme, and wordmark values
374+ for value , description , choices in [
375+ (shape , "value for shape" , ("circle" , "hexagon" )),
376+ (theme , "value for theme" , ("light" , "dark" )),
377+ (wordmark , "value for wordmark" , ("none" , "horizontal" , "vertical" )),
378+ ]:
379+ if value not in choices :
380+ raise GMTValueError (value , description = description , choices = choices )
381+
373382 # Set the default size of the visual logo to 2 cm.
374383 if width is None and height is None :
375384 match wordmark :
376385 case "none" | "vertical" :
377386 width = width or "2c"
378387 case "horizontal" :
379388 height = height or "2c"
380- case _:
381- raise GMTValueError (
382- wordmark ,
383- description = "value for wordmark" ,
384- choices = {"none" , "horizontal" , "vertical" },
385- )
386389
387390 with GMTTempFile (suffix = ".eps" ) as logofile :
388391 # Create logo file
0 commit comments