diff --git a/glue_plotly/html_exporters/jupyter/image.py b/glue_plotly/html_exporters/jupyter/image.py
index 6697c71..54af25d 100644
--- a/glue_plotly/html_exporters/jupyter/image.py
+++ b/glue_plotly/html_exporters/jupyter/image.py
@@ -28,6 +28,7 @@ def save_figure(self, filepath):
config.update(**ax)
secondary_x = 'xaxis2' in ax
secondary_y = 'yaxis2' in ax
+ config["showlegend"] = len(layers) > 1
if secondary_x or secondary_y:
fig = make_subplots(specs=[[{"secondary_y": True}]], horizontal_spacing=0, vertical_spacing=0)
diff --git a/glue_plotly/html_exporters/qt/image.py b/glue_plotly/html_exporters/qt/image.py
index b047da3..5af7e1d 100644
--- a/glue_plotly/html_exporters/qt/image.py
+++ b/glue_plotly/html_exporters/qt/image.py
@@ -44,6 +44,7 @@ def _export_to_plotly(self, filename, checked_dictionary):
config.update(**ax)
secondary_x = 'xaxis2' in ax
secondary_y = 'yaxis2' in ax
+ config["showlegend"] = len(layers) > 1
if secondary_x or secondary_y:
fig = make_subplots(specs=[[{"secondary_y": True}]], horizontal_spacing=0, vertical_spacing=0)