Labeling Streamlines in StreamPlot

  • Context: Mathematica 
  • Thread starter Thread starter member 428835
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
member 428835
Hi PF!

I am trying to label two different sets of streamlines but am having no luck. My code is
Code:
StreamPlot[{{y, -x}, {x, y}}, {x, -3, 3}, {y, -3, 3},
 PlotLegends -> LineLegend["graph 1", "graph 2"]]
Thanks!
 
Physics news on Phys.org
Try the simpler approach
Code:
StreamPlot[{{y, -x}, {x, y}}, {x, -3, 3}, {y, -3, 3},
PlotLegends -> {"graph 1", "graph 2"}]
 
  • Like
Likes   Reactions: member 428835