How can I label each of these lines separately :

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

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}]]
```

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]};
```

You can insert legends in your plot by loading the `PlotLegends`

package

```
<<PlotLegends`;
Plot[{5+2 x,6+x},{x,0,10},
PlotLegend->{"5+2x","6+x"},LegendShadow->None,
LegendPosition->{0.3,-0.5},LegendSpacing->-0,LegendSize->0.5]
```

However, let me also note my dislike of this package, primarily because it's extremely counterintuitive, laden with too many options and does not provide a clean experience right out of the box like most of Mathematica's functions. You will have some fiddling around to do with the options to get what you want. However, in plots and charts where you do want a legend, this can be handy. Also see the comments to this answer and this question.

Mathematica 9 now provides easy ways to include legends.

```
Plot[{{5 + 2 x}, {6 + x}}, {x, 0, 10}, PlotLegends -> "Expressions"]
```

Similar Questions

I have the following HTML radio buttons and I need to add 'checked' as the class of the label when the relevant radio button is selected. The code below works for clicks, but I also need the class add

My Flash application receives B-spline data from an external application but the Flash drawing API only allows quadratic bezier curves using the Graphics#curveTo() method. Is it possible to convert a

In GVIM How do I paste a column of text from a different file after a different column of text in another file? -regards

I read this great question about showing and doing simple arithmetic on them, but I am wondering given this (or simply starting from scratch), how to show and then further similarly do arithmetic on t

I have a listview with multiple columns. One of the columns is a checkbox, another is a label. There are other columns but they're not really relevant to this issue. In the click event of a button on

Let's say I have a relation r^2 = x^2 + y^2. Now suppose after a calculation i get a complicated output of x and y, but which could in theory be simplified a lot by using the above relation. How do I

The label tag doesn't have the property 'width', so how should I control the width of a label tag?

I have created this using the mathematica bezier curves. I just want to know how could I fill these fonts with colour using some mathematica routines. Thanks

How I can get the generated view code below to place the editor-field to the right of the editor-label, on the same row? I don't want to mess with the generated defaults, e.g. remove the divs, as I am

How can I make a label bold in a Django form? The form element goes like this: condition = forms.TypedChoiceField(label=My Condition is, coerce= int, choices=Listed.CONDITION, widget=RadioSelect(att

I want to work with a DataGrid in Kaxaml. How do I reference the toolkit dll?

I am designing a site for my company and i was stuck on how to load one iframe and have the next one queuing to be displayed.How would i write a script that loops through different iframes after time?

I use setTitle to change the activity label on runtime. But every time when rotating the phone, the activity label changes back to its initial state. How can I prevent this?

wolfram alpha accepts latex, but it does not export to latex, it exports plaintext,rendered images and mathematica sytax. Is there any javascript library that converts the output to latex? Mathematica

When you create a label control in JavaFX, how do you erase it during an event of i.e. a button click? Here is how I created my Label: Label result= new Label(The result is ...); root.add(result, 0

In a split view controller app,how can I segue to different detail view controllers upon selecting a table row in the master view controller? Just to be clear, I need the detail view controller to be

With antlr4 I can label rule alternatives like this: e : e '*' e # Mult | e '+' e # Add | INT # Int ; From what I understand, in the rule above, Mult has higher precedence over Add because Mult comes

I am quite new to Xcode and I am having trouble placing the value of a slider in a label when the slider is value is changed. Here is my code: Header file: @interface ViewTwoViewController : UIViewCon

Mathematica provides MonomialList[f] to get all monomials in f: MonomialList[(x+y)^2]={x^2,2xy,y^2} But what I need is {x^2,xy,y^2}, how can I make it?

Can anyone tell me the attribute to set to label the units on a LinePlot in ReportLab? Also, if you know how to set a title, that would be ultimately super helpful. drawing = Drawing(50,50) data = [(

ends up like XXXXX XXXXX Description: XXXXX I want XXXXX Description: XXXXX XXXXX Description sometimes spans multiple lines. Code: <p class=DataForm> <label>Blah blah blah Descrip

I am trying to refine algebraic expressions into a convenient form using Mathematica to make sure I don't drop a sign or make some other trivial slip. After a lot of swearing, I have come to accept th

How do I redirect this: www.sub.example.com to this: www.example2.com How is this done -- 301? .htaccess? Can someone point me in the right direction please? My host is NearlyFreeSpeech and the domai

I'm trying to start a different ViewController when a BOOL in NSUserDefaults isn't set.. When the RegistreerView is loaded the screen stays white? What do i do wrong? How can i start a different Vie

This question already has an answer here: C# vertical label in a Windows Forms 5 answers I want to show a label rotated 90 degrees (so I can put a bunch of them at the top of a table as the hea

So far I have it so you are running around in a box, but all of the walls are the same texture! I've loaded up other textures for the walls (I want the walls a different texture than the floor) but it

Is there a new line command for SWT on windows? If there isn't, what am I doing wrong here? Here's the code public static void main (String [] args) { Display display = new Display(); Shell shell = n

I have a Label, let's call it currencyFormattedLabel, the value of which was earlier formatted in another method as currency (with currencyFormatter). Now, I want to use the number equivalent in that

I'd like to know how can I call Mathematica functions from Python. I appreciate a example, for example, using the Mathematica function Prime. I had search about MathLink but how to use it in Python is

I've no real idea how to do this and I have tried messing with a timer but to no avail so far. So what am I trying to do? I have a label that is blank. When a certain event is triggered I want the lab

I've got a simple text on my page which needs localizing, but it contains a link. How do I localize it? Click <a href=/ercc/releasenotes>here</a> for the release notes. So I need to be

If I have some function y[x_]:=ax+b (just an example), how do I obtain x[y_]:=(y-b)/a in Mathematica? I've tried InverseFunction,Collect and they don't work.

How to call a Mathematica function inside Matlab? There are certain symbolic equation manipulation/simiplification that's particularly easy to do in Mathematica, at least to me, and I'd like to use Ma

This question already has an answer here: Error: Jump to case label 2 answers I have the following error in my Calculator code and do not understand how to correct it. Please any advice would b

I am new to Mathematica and currently working with time series data. I have the following input data in Mathematica 9.0 data = {{{2011, 3, 13}, 10}, {{2011, 3, 14}, NA}, {{2011, 3, 15}, 20}, {{2011,

I am trying to gain a deeper understanding of how Mathematica expressions are represented internally, and am puzzled by the logic of the Level command in Mathematica. If we have the following input: I

Lets say I have a function f[x_, y_], and two lists l1, l2. I'd like to evaluate f[x,y] for each pair x,y with x in l1 and y in l2, and I'd like to do it without having to make all pairs of the form {

Increasing my score label 137 points per item I pickup fMain //HUD Score public int Score() { labScore.Text = Convert.ToString(score); labScore.Text = 00000 + score; if (score >= 10) labScore.Tex

http://pastebin.com/3A4P61Gt The code in question is specifically at line 143. Whenever I try to access a label in the array like so Dicelbls(0).Text I get a null reference error. Obviously I am not d

The JuiceUI AutoComplete control accepts a string[] for the Source property, yet in documentation it says you can use label/value pairs. I'm not very familiar with the jQuery autocomplete stuff to beg

How can I find element by aria-label attribute name in Watin? I searched all the options but didn't find any way to do it.

I have this name on my input driver_application[company_name] and i need to create the label name to be driver_application_company_name Here is my jquery to get the input $(.company_name).attr(n

How to compare two black curves on a white background? How to do it as fast? For example this and this are similar, but this and this are not First curve I'll draw on JPanel, second is image.

I am trying to change the tick labels in a ggvis plot. My data points are x = c(1,2,3) and y = c(1,2,3). However, the following code results in tick labels which make no sense at all! library(dplyr) l

I have a basic bar chart I'm presenting in flot (5 bars, displaying the % per status). $.plot($(#placeholder), [ { label: 'Failed', data: [[0,10]], bars: { show: true } }, { label: 'Passed', data: [

I have a time-series like function which gives an output based on a list of real numbers(i.e. you can run the function on a list of 1,2,3,... real numbers). The issue I'm encountering is how to maximi

In graph theory, we use the Hungarian Algorithm to compute a weighted bipartite graph's minimum edge cover (a set of edges that is incident to every vertices, the one with the minimum total weight.) I

I have 10 sets of 3D points. Each set represents points on a smooth curve. I can easily fit a curve to each set in Matlab and get 10 curves. How can I now fit a surface through these curves in Matlab?

Although I know how to create a Google map circle as expressed below. I'd love to know to to add a label to the created circle saying for instance best pizza restaurants etc. As in image below: Co

I am trying to vertically align input and label and button( which is inside a div) How can I achieve this My present code which is not working is the following <table> <tr> <label style