diff --git a/graphics/base.py b/graphics/base.py
index <HASH>..<HASH> 100644
--- a/graphics/base.py
+++ b/graphics/base.py
@@ -40,7 +40,7 @@ def set_format(instance, default="pdf"):
     allowed_format = ("emf", "eps", "pdf", "png", "ps", \
                       "raw", "rgba", "svg", "svgz")
 
-    instance.add_option("--format", default=default,
+    instance.add_option("--format", default=default, choices=allowed_format,
             help="Generate image of format, must be one of {0}".\
             format("|".join(allowed_format)) + " [default: %default]")
missing choices option in graphics.base.set_format()