Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6383567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:39:55+00:00 2026-05-25T02:39:55+00:00

How can I label each of these lines separately : Plot[{{5 + 2 x},

  • 0

How can I label each of these lines separately :

Plot[{{5 + 2 x}, {6 + x}}, {x, 0, 10}]

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:39:56+00:00Added an answer on May 25, 2026 at 2:39 am

    There’s some nice code that allows you to do this dynamically in an answer to How to annotate multiple datasets in ListPlots.

    There’s also a LabelPlot command defined in the Technical Note Labeling Curves in Plots

    Of course, if you don’t have too many images to make,
    then it’s not hard to manually add the labels in using Epilog, for example

    fns[x_] := {5 + 2 x, 6 + x}; 
    len := Length[fns[x]];
    
    Plot[Evaluate[fns[x]], {x, 0, 10}, 
     Epilog -> Table[Inset[
        Framed[DisplayForm[fns[x][[i]]], RoundingRadius -> 5], 
        {5, fns[5][[i]]}, Background -> White], {i, len}]]
    

    outputa

    In fact, you can do something similar with Locators that allows you to move the labels wherever you want:

    DynamicModule[{pos = Table[{1, fns[1][[i]]}, {i, len}]},
     LocatorPane[Dynamic[pos], Plot[Evaluate[fns[x]], {x, 0, 10}],
      Appearance -> Table[Framed[Text@TraditionalForm[fns[x][[i]]], 
                      RoundingRadius -> 5, Background -> White], {i, len}]]]
    

    In the above I made the locators take the form of the labels, although it is also possible to keep an Epilog like that above and have invisible locators that control the positions.
    The locators could also be constrained (using the 2nd argument of Dynamic) to the appropriate curves… but that’s not really necessary.

    As an example of the above code with the functions with the labels moved by hand:

    fns[x_] := {Log[x], Exp[x], Sin[x], Cos[x]};
    

    four functions

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

each cell in my table has a label, with maximum three lines, so the
How can I display labels for each point plotted in a ZedGraph chart?
I was wondering how I can add \label into bibtex so that when I
I have a GridView with a Label. The value of the Label can be
What is more lightweight control, a label, or a picturebox? (label can contain image
Can I set label visibility in Flex ? newUser = new LinkButton(); newUser.label =
How can I set label's border which is dynamically generated (Not from Interface Builder)?
In Clearcase I can generate a label for a given set of files and
How can I add two label in the same grid box? e.g. in row
Can you show sample code for reading a drive label or volume name in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.