diff --git a/gradio/components/plot.py b/gradio/components/plot.py index cb92b97f9a..cda380762e 100644 --- a/gradio/components/plot.py +++ b/gradio/components/plot.py @@ -154,12 +154,12 @@ class AltairPlot: @staticmethod def create_legend(position, title): if position == "none": - legend = None - else: - position = {"orient": position} if position else {} - legend = {"title": title, **position} + return None + + if not position: + return {"title": title} - return legend + return {"title": title, "orient": position} @staticmethod def create_scale(limit):