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)

44
votes
4answers
11k 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 ...
26
votes
3answers
4k 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
7answers
11k 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
3k 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
3k 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
1k views

Legends in combined Plot and ListPlot

I have a set of data ...
14
votes
5answers
714 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
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: ...
17
votes
4answers
1k 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
387 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. ...
4
votes
2answers
196 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
767 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
693 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 ...
0
votes
1answer
478 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
881 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
451 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
950 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
1k 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
634 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 ...
2
votes
1answer
247 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 ...
5
votes
2answers
333 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: ...
3
votes
1answer
202 views

Problem with the Plot of Functions and PlotLegends

For some odd reason the PlotLegends output is not as expected. ...
2
votes
1answer
274 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. ...
9
votes
3answers
807 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: ...
6
votes
1answer
241 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 ...
3
votes
1answer
129 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 ...
3
votes
1answer
218 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 ...
3
votes
2answers
1k 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: ...
1
vote
3answers
851 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
279 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
367 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 ...