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)

53
votes
4answers
17k 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 ...
26
votes
3answers
6k 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 ...
31
votes
3answers
6k 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 ...
34
votes
7answers
18k 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 ...
29
votes
7answers
5k 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 ...
19
votes
5answers
5k 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. ...
5
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
2k views

Legends in combined Plot and ListPlot

I have a set of data ...
18
votes
4answers
3k 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
2answers
569 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. ...
6
votes
4answers
938 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 ...
11
votes
3answers
6k 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: ...
13
votes
1answer
270 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
269 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
595 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) ...
6
votes
2answers
388 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 ...
5
votes
3answers
174 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 ...
1
vote
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 ...
1
vote
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
1k 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
86 views

How to simulate Placed in workaround for PlotLegends ParametricPlot bug?

I'd like Legended output for call like: ...
2
votes
4answers
630 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 ...
0
votes
1answer
932 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 ...
15
votes
5answers
1k 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 ...
8
votes
4answers
2k 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 ...
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: ...
9
votes
3answers
237 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 ...
5
votes
3answers
944 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
283 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
351 views

Problem with the Plot of Functions and PlotLegends

For some odd reason the PlotLegends output is not as expected. ...
2
votes
1answer
351 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
638 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 ...
6
votes
1answer
174 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
393 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
282 views

Single Legend for a Table of Plots

For this toy problem ...
5
votes
2answers
220 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
209 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 ...
4
votes
2answers
2k views

Plot CSV-data; make statistical statements in Mathematica / WA

First, I'm quite new to Mathematica so sorry in advance if some questions seem to be trivial. I have a CSV-file which looks like this: ...
3
votes
1answer
334 views

rasterListContourPlot With PlotLegends in Mathematica 9

Jens Nöckel has write functions about (List) Contour Plots with rasterized shading in Mathematica: http://pages.uoregon.edu/noeckel/computernotes/Mathematica/rasterContourPlot.html It works well. ...
10
votes
3answers
1k views

How do I change the Font in BarChart Legend?

Just wondering if anyone knows the proper Syntax to change the Text properties in the BarChart's ChartLegend. I cannot seem to figure out how to get Style[] to apply. Here is an example: ...
9
votes
2answers
505 views

In version 9 PlotLegends, how can I remove the strange edges that appear around LegendMarkers?

I'm running Mathematica version 9. I am using ListPlot to plot two sets of data. For each data set, I am using different ...
6
votes
2answers
112 views

PlotLegends “Expressions” default for ListPlot?

gwr pointed out an apparent problem with setting a default Option value of PlotLegends for DateListPlot. I traced the problem ...
5
votes
1answer
236 views

Wrong BarLegend with VisibleSpectrum

...
4
votes
1answer
143 views

Boundaries of graphical objects not displayed correctly

Bug introduced in 10.0.0 and fixed in 10.0.1 I have encountered two situations where Mathematica 10 is mishandling the outer pixels of plainly simple objects. I input this: ...
3
votes
1answer
507 views

Create a colorbar plot legend

I have the following list of parametric equations lst = {10*Cos[u]*Sin[v], 3*Sin[u]*Sin[v], 2*Cos[v]}; I define the following color function ...
3
votes
1answer
265 views

SetOptions or other approach to imposing default styling of text in a BarChart Legend?

Gustavo Delfino's answer to an earlier question showed that it is possible to use the third argument to Placed to format text in a ...
1
vote
0answers
49 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 ...
1
vote
2answers
138 views

Using Placed with Show - the simplest solution to move the legend around?

Please let me know if this is a duplicate. There are some solutions, but I think there must be something simpler for this kind of situation. ...
1
vote
1answer
125 views

No legends in parametric plot

plotting some descibing functions, I wondered why I don't get any legends in my plot. The describing functions (and options): ...