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)

48
votes
4answers
13k 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
5k 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 ...
28
votes
3answers
5k 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 ...
32
votes
7answers
13k 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 ...
23
votes
7answers
4k 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
4k 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. ...
4
votes
3answers
4k 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.
8
votes
2answers
2k views

Legends in combined Plot and ListPlot

I have a set of data ...
14
votes
5answers
828 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 ...
17
votes
4answers
2k 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
459 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. ...
9
votes
2answers
4k 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: ...
6
votes
2answers
258 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 ...
1
vote
1answer
900 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
808 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
4answers
176 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
608 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 ...
14
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 ...
10
votes
3answers
508 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) ...
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: ...
7
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 ...
5
votes
3answers
755 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
238 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
259 views

Problem with the Plot of Functions and PlotLegends

For some odd reason the PlotLegends output is not as expected. ...
2
votes
1answer
276 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 ...
13
votes
2answers
283 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 ...
5
votes
2answers
181 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 ...
5
votes
2answers
356 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: ...
4
votes
3answers
166 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
190 views

Single Legend for a Table of Plots

For this toy problem ...
3
votes
1answer
306 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. ...
1
vote
3answers
1k 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 ...
10
votes
3answers
911 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
377 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 ...
4
votes
1answer
128 views

Boundaries of graphical objects not displayed correctly

I have encountered two situations where Mathematica 10 is mishandling the outer pixels of plainly simple objects. I input this: ...
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
230 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
1answer
67 views

Adding a legend to a MatrixPlot

I have produced this MatrixPlot: Rows refer to countries and columns to ranks. Row 1 refers to Norway with many 1 ranks, row 15 to Greece with many 15 ranks. Other countries are inbetween. I would ...
1
vote
1answer
326 views

Concerning ShowLegend in Mathematica

I found a code for Mie Scattering from 2007, written for Mathematica. I have edited it quite a bit, since there are package definitions that we don't need, etc. But I am having difficulties ...
1
vote
1answer
444 views

Dynamically labeling a family of curves [duplicate]

I have created some simple code which generates a plot. This plot contains a family of curves created by changing a single parameter "k". I use the Table function within the Show function to iterate ...