Questions on legends, figures (usually insets) that indicate what those lines/bars/points in plots refer to, using arrangements of graphic elements and text, whether manually or using built-in functions.

learn more… | top users | synonyms (1)

55
votes
4answers
20k views

Creating legends for plots with multiple lines?

So I have a graph with multiple lists, for e.g. data = {{1,2}, {3,4}, {3,5}, {2,3} . . .} If I then do ...
33
votes
3answers
8k views

ListPlot with each point a different color and a legend bar

I would like to generate a ListPlot with the color for each point in the plot corresponding to a particular value (not associated with the position in the plot). I'd then like to add a legend ...
28
votes
3answers
7k views

ShowLegend values

How do I get ShowLegend to put the max and min values that a plot produces. for example, when using ListDensityPlot, with ...
42
votes
7answers
24k views

Labeling individual curves in Mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal ...
33
votes
7answers
6k views

Sizing cells in a GraphicsGrid/GraphicsRow

I would like to add a colour bar to a plot. I tried to use GraphicsRow for this. In a GraphicsRow, each item is given the same ...
22
votes
7answers
6k views

Using PlotLegends with Show messes up the graphics

I have already obtained the plot that I want but am having trouble legending the graph correctly. ...
6
votes
3answers
5k views

How can I label a ListDensityPlot with a color bar?

Here is an example of what is desired, only the result wouldn't be a contour plot, but a ListDensityPlot. The arguments would be a gradient and a list of numbers.
14
votes
5answers
1k views

Changing the order of elements in a chart legend

In a stacked BarChart or Histogram the bars are stacked from bottom to top, while the legend entries are listed from top to ...
9
votes
2answers
3k views

Legends in combined Plot and ListPlot

I have a set of data ...
18
votes
4answers
4k views

Setting the default font for PlotLegends

I'm pleased that Mathematica 9 appears to have brought us prettier legends. If I always want the legend in ...
13
votes
1answer
313 views

PlotLegends won't generate automatically more than 15 labels in v10

Update: NOT fixed in v 10.1.0 (Mar2015) While testing the examples from this recent post, i've noticed a problem in V.10 with PlotLegends when it has to ...
10
votes
3answers
401 views

Match colors to plot themes

How do I get the colors to match the plot theme when I use a PlotLegend that is separate to the plots? I have had a look at How to access new colour schemes in ...
8
votes
2answers
555 views

How to raise the LegendLayout “Row” size

When using LegendLayout->"Row", with a lengthy row, I get line breaks. This would seemed logic if it was confined by another structure. But if happens even when ...
13
votes
2answers
645 views

How can I get LineLegend to pick up my plot's BaseStyle?

The new legends functionality in version 9 really simplifies creating legends, and it automatically picks up the styles of the lines. ...
3
votes
1answer
186 views

Customizing a graph (Dashing, PlotMarkers, Labeled)

There are actually several questions here but I thought they are closely related so I should not split into several posts. Here we go... I have the following list ...
6
votes
4answers
1k views

ParametricPlot and PlotLegends don't seem to cooperate

Bug introduced in 9.0.1 -- fixed in 10.0.0? I noted that only part of the legend shows up in ParametricPlot using v9's ...
12
votes
3answers
7k views

Legend of a plot: how to increase the size of the line/marker?

I'm using the following kind of code to do the legends of my plots: ...
10
votes
3answers
374 views

Changing BarLegend border style

I want all the lines in my plot to be a consistent style, let's say thick and black for the purpose of this question. ...
10
votes
3answers
668 views

How to use legends from PlotLegends in LevelScheme?

I've been attempting to find efficient ways to generate graphics with legends for export, and have been working with both LevelScheme and the new (to v9) ...
2
votes
3answers
2k views

Mathematica 8: ContourPlot finding out max and min function values [duplicate]

I have a ContourPlot where I have let Mathematica draw the contours automatically. I would like to extract the zmax and zmin contour values that have been determined internally so that I can pass them ...
5
votes
3answers
279 views

adjust the alignment of different legends

I used Show to combine a ListPlot and Plot, and each plot has its own legend. The code is as ...
4
votes
3answers
146 views
3
votes
4answers
2k views

How to add PlotLegends in a Show function?

I have multiple ListPlot in a Show where i want to add PlotLegends, but adding the ...
2
votes
1answer
1k views

Adjusting the legend colors to match that in MatrixPlot

I am trying to show the legend with a ColorData for a discrete Fourier transform coefficient table. Here's a sample data table: ...
8
votes
1answer
2k views

How to position legends exactly where I want them?

I just noticed another plot legend question today and while user solutions to this, in particular code by @Jens, are IMO better than the built in solutions, exact positioning often still requires some ...
2
votes
1answer
93 views

How to simulate Placed in workaround for PlotLegends ParametricPlot bug?

I'd like Legended output for call like: ...
1
vote
1answer
77 views

Different distance in .jpg plot and .eps

I noticed that when I run my code to draw a plot: ...
1
vote
1answer
459 views

Plotting legends in contourplot

In Mathematica 8. Given this: ...
0
votes
1answer
1k views

How to show legend in a combined plot of many lists,

I am having trouble with adding a legend to a plot. The example I discuss here is simpler than my real problem, but describes it well. I have a vector, called X with dimensions (100 x 6). I use the ...
18
votes
1answer
4k views

Logarithmic scale in a DensityPlot and its legend

I was recently faced with the task of creating a DensityPlot with a logarithmic colour scale, and with providing it with an appropriate legend. Since I could not find any resources to this effect on ...
15
votes
3answers
8k views

How can I save both the plot and the legend together?

In this example, how can I put the legend inside the graph? Currently, when I save the graph, only the graph is saved, not the legend. ...
13
votes
1answer
357 views

BarLegend changes in Version 10

Apparently, BarLegend in version 10 displays tick legends in scientific notation when they are smaller in magnitude than 0.01. For instance, ...
8
votes
2answers
13k views

Plot legend inside a Show [duplicate]

Possible Duplicate: Using PlotLegends with Show messes up the graphics I have created a composite plot function: I want to add a legend to it, however ...
18
votes
5answers
2k views

Make legend same height as plot

One common style for density plots is to have a vertical legend that is the same height as the plot itself. Some example density plots from Google Image search: How can we make DensityPlots with ...
15
votes
3answers
2k views

How can I change the size of the plot markers

I use ListPlot in order to plot four sets of data and also insert legends in my plot. Here is the Mathematica code ...
8
votes
4answers
3k views

How to add a common color legend to a grid of density plots?

I have a grid of density plots, say something like: GraphicsGrid[Partition[Table[ DensityPlot[Sin[i x] Sin[y/i], {x, -4, 4}, {y, -3, 3}], {i, 1, 4}], 2]] I ...
15
votes
2answers
1k views

Changing the inter-item spacing in Legends (version 9 and up)

The legending functionality in versions 9 and higher is much easier to use than the PlotLegends package and other bespoke ways of creating legends in earlier ...
12
votes
3answers
1k views

Adapt ticks in plot and font in legend

Some of my 2-dimensional data are displayed with a code similar to this: ...
8
votes
1answer
498 views

How does PlotLegends actually work with ListPlot3D?

I'm sensing this might be a rookie mistake but normally I roll my own legends but decided to try the built in legends for a ListPlot3D. ...
5
votes
3answers
1k views

Using PlotLegends

Please don't answer this with "Just trash PlotLegends" or anything like that as I have tried homebrew solutions. I keep running into problems which I can't debug as ...
4
votes
1answer
328 views

Dynamic legends involving show

My question is how do I get dynamic legends (legends that turn data on/off) to work with Show? This is an extension of an old question here; How to dynamically toggle curves on/off in a crowded ...
4
votes
1answer
439 views

Problem with the Plot of Functions and PlotLegends

For some odd reason the PlotLegends output is not as expected. ...
2
votes
1answer
411 views

Mesh inside Plot legend

I have a plot for which I would like to create an legend that is black and white printer friendly. I have seen Jen's legendmaker but I don't know how to adapt it. I need help in making the legend for ...
15
votes
2answers
1k views

PlotLegends -> “Expressions” not working when Plot given one function

I don't get a legend when I use the option PlotLegends -> "Expressions" when the first argument to Plot is a single function. It works OK when I give ...
7
votes
3answers
155 views

BarLegend can't make spaced contours when contours number>11

According to Document of BarLegend,BarLegend will select equally spaced contours: BarLegend[cf,contours] generates a legend that identifies color ranges from the color function cf based on the ...
6
votes
1answer
243 views

How to share LineLegend among sub-figures in GraphicsGrid?

Using GraphicsGrid, I have put two figures that share the same x-axis in a row. However, I failed to let them share a common ...
6
votes
2answers
434 views

How To Span Table Headings?

What I am doing wrong? I would like to get a header to the table and based on your code I tried this: ...
5
votes
2answers
418 views

Single Legend for a Table of Plots

For this toy problem ...
5
votes
2answers
261 views

How to set PlotLegend Number Format

Is there any way to make Mathematica to show the legend labels like a real number rather than in fraction form? I read the BarLegend options, however they are just ...
4
votes
3answers
240 views

How to make an arbitrary number of plots have different labels/colors/etc?

I'm sorry but I'm not sure how to phrase this question well. Frequently I have a function that produces and returns a Plot[] or array of Plot[]'s, which I can then display with Show[], or combine with ...