Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica Labeling Plot

  1. May 23, 2017 #1

    joshmccraney

    User Avatar
    Gold Member

    Hi PF!

    I am trying to label two different sets of streamlines but am having no luck. My code is
    Code (Text):

    StreamPlot[{{y, -x}, {x, y}}, {x, -3, 3}, {y, -3, 3},
     PlotLegends -> LineLegend["graph 1", "graph 2"]]
    Thanks!
     
  2. jcsd
  3. May 23, 2017 #2

    DrClaude

    User Avatar

    Staff: Mentor

    Try the simpler approach
    Code (Text):
    StreamPlot[{{y, -x}, {x, y}}, {x, -3, 3}, {y, -3, 3},
    PlotLegends -> {"graph 1", "graph 2"}]
     
  4. May 23, 2017 #3

    joshmccraney

    User Avatar
    Gold Member

    Thanks!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted