Skip to main content
edited tags
Link
Derek O
  • 18.9k
  • 4
  • 27
  • 45
Source Link
william_grisaitis
  • 5.7k
  • 4
  • 40
  • 51

Showing or saving only the legend of a plotly figure

Given a plotly figure with traces and a legend, is there a way to only show the legend without any of the plot content?

My use case for this: I'm exporting several images with the same legend. Instead of exporting the figure with the legend, I'd like to export the plot area and the legend separately. This would give me the flexibility to embed these images in presentations - perhaps resizing the legend, perhaps not including it, moving it around, etc.