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)

1
vote
2answers
67 views

Barlegend with a different z span for ListDensityPlot

I would like to rescale the colors in a plot and to do this in the same way for the color bar. (So this enables me to have the color bar span a (z) range larger than than the data itself.) I got this ...
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 ...
1
vote
1answer
464 views
1
vote
2answers
50 views

Colour bar for contour 2D graph [duplicate]

How could I plot the colour legend for my 2D contour graph ...
2
votes
1answer
56 views

Different fonts in the same Style in a Plot

I have a plot, not important what it is and I have a linelegend as below: ...
2
votes
3answers
4k views

How can I change the position of my plot legends?

As the title indicates, I want to change the current position of the legends in a combined plot. The Mathematica code I used is ...
2
votes
1answer
47 views

ShowLegend - length of legend items

I have the following example code and would like to make the lines in the legend longer - how can that be done? Is there another possibility to plot such a legend when using ...
2
votes
1answer
66 views

Can I put Plotlegend to each my rho values?

I want to put PlotLegend[] into my graph for every rho value. Graph P is for ...
3
votes
1answer
247 views

logticks in a colorbar

I have a question on using logarithmic ticks in a colorbar in Mathematica 8.0 . I use the package ColorbarPlot (...
0
votes
1answer
27 views

Bad output for SwatchLegend using LegendMarker with an EdgeForm

Consider the following input which should give a legend with a red rectangle and a black frame: ...
1
vote
2answers
90 views

How can I have PlotLegends showing the legend on a single line instead of two?

I am using PlotLegends in a Plot command to label each line of my plot (it has 4 different functions plotted) but the legend is split in two lines. I would like it two appear in a single line so it ...
7
votes
1answer
80 views

Multiple PlotLegends ignore NumberForm

Imagine a set of curves data = Transpose@Table[{Exp[t], Exp[1.1 t], Exp[1.2 t], Exp[1.3 t]}, {t, 0, 5, 0.1}]; which should be labelled with numbers ...
4
votes
2answers
352 views

PlotLegends and ImageSize

I have Mathematica 9.0.1, and I have problems with PlotLegends breaking the ImageSize directive. I defined ...
0
votes
0answers
37 views

Names disapper when using PlotLegend [duplicate]

I am using Mathematica 8.0.1.0 and when I use PlotLegend the names disappear. Could you help me fix it? Thank you. ...
1
vote
0answers
52 views

Discrete color bar: height not adjusting

I am trying to adjust height of my color bar, but LegendMarkerSize is not doing what it is supposed to do. Code ...
19
votes
2answers
681 views

How can I generate a legend for a BubbleChart?

Is there a way to make a nice disk radius legend (with linear or log scale) for a BubbleChart? Something like the following example should be built in:
5
votes
2answers
392 views

Legend Matrix Plot

I have the following problem. I'd like to add a legend to MatrixPlot. Each colour should have a legend entry. I used ...
0
votes
1answer
87 views

How to discard colorbar shadow in contour ploting in mathematica [closed]

I am plotting a contour plot in Mathematica with Showlegend command, but trouble is that I am getting a black shadow with colorlegend which I want to remove. ...
3
votes
1answer
58 views

TargetUnits in BarLegend

Is there any way to get the '%' in the BarLegend to be black instead of light gray? ...
4
votes
1answer
45 views

LineLegend is behaving erratically

The top one is fine, but if I change Red into dashed version, it behaves erratically.
2
votes
1answer
92 views

Generating plot legends [duplicate]

I want to generate a list as below for the legend of my plot, {D=0, D=0.5, D=1, ...} using the code ...
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 ...
5
votes
2answers
68 views

BarLegend with two different scales (ticks&labels)

I am looking for a way to plot e.g. a legended DensityPlot with a BarLegend, where the colorbar shows two differently scaled ...
3
votes
2answers
96 views

Problem with PlotLegends in Manipulate

Please consider this simple code: Manipulate[ Plot[{a Sin[x], a Cos[x]}, {x, 0, 2 Pi}, PlotLegends -> "Expressions"], {a, 1, 2}] Mathematica returns this ...
2
votes
2answers
76 views

Does PlotLegend lie in a figure?

I wonder if PlotLegends is part of a figure. Indeed in the code ...
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 ...
7
votes
2answers
106 views

How to generate a Log BarLegend for a DensityHistogram

I have a Log count histogram: DensityHistogram[myData, 100, {"Log", "Count"}, ColorFunction -> "Rainbow", ChartLegends -> Automatic] But ...
0
votes
1answer
142 views

Plot legends not displaying correctly

I'm having an issue with a notebook I'm running. I'm generating a bunch of plots, but the legends aren't showing up correctly. I generate a bunch of plots every time I run the program so I wrote a ...
1
vote
2answers
76 views

Problems with formatting PlotLegends text [closed]

To avoid issues, I post here the photo to explain you better what my problem is. So what I would like to have, is a "correct" writings of the legend text for the Blue function. I would like it to ...
7
votes
3answers
157 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 ...
8
votes
1answer
803 views

Font size in PDF export with legended plots not working

I need to export plots as PDF with a given image and font size. Everything is working fine if there is no legend for that plot. However, if I want to export legended plots, the font size is decreased ...
5
votes
4answers
236 views

ContourPlot refuses to show in-figure PlotLegends after turn on ContourShading

I would like to do a contour plot with a label inside the figure itself. For example, the following works well: (note there is a small text "example" at the right bottom figure) ...
4
votes
3answers
1k views

Adding plot legends in version 8

I use Mathematica to draw the displacement, velocity, and acceleration of one point in a graphic. ...
1
vote
2answers
102 views

Matching colors in BarLegend and colorfunction

How I can use Hue as color function in BarLegend in this density plot? ...
4
votes
2answers
197 views

Making a better looking plot legend

I want to plot two (or more) functions, inserting in the plot itself the legend that will clarify me what are those plotted functions. I know this basic standard command lines: ...
22
votes
7answers
7k 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
1answer
244 views

Problem with exporting a plot with a legend to PDF

I've found a simple example that illustrates my problem: ContourPlot[x^2 - 1 == y, {x, -1, 1}, {y, -1, 1}, PlotLegends -> "Expressions"] When I try to export ...
4
votes
4answers
230 views

Combine multiple swatch legends

How can I combine multiple SwatchLegends? As a minimal example: ...
5
votes
1answer
100 views

inset legend from top right corner / find size of swatchlegend bounding box

The question is the following. Using Inset, we can insert a legend in a Plot (in a Graphic, in general). E.g. ...
2
votes
1answer
139 views

BarLegend too large for plot in version 10.3

In previous versions, the following code, taken from here from @kglr, used to give a reasonably sized legend, but in version 10.3 gives a huge legend. ...
1
vote
1answer
94 views

How to border legends in ListLinePlot

I'm trying to use ListLinePlot for 3 data sets, and I want to put borders for my legends. Here is my code: ...
1
vote
1answer
91 views

Is it possible to use vectorized Plot Legend?

I upload data using the following code data = Import["L" <> # <> ".dat"] &/@{"10", "102", "103", "104"}; My function is ...
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 ...
1
vote
1answer
90 views
1
vote
1answer
106 views

How can I plot legends on only some of my curves that all plotted together?

I am using ListPlot to plot many lines in the same graph. I want to put in a legend but only for a subset of these lines. For example ...
4
votes
2answers
402 views

In LineLegend, how do I force the legend entries to appear in a single column?

I want to create a single column LineLegend with at least 12 different entries. Suppose that I define lists colors and ...
13
votes
3answers
371 views

How can I change the thickness of tick marks in BarLegend?

Bug introduced in 10.2 or earlier and persisting through 10.3.0.0 or later This answer explains how to change various undocumented options for BarLegend with ...
1
vote
2answers
63 views

Formatting legend text font multiple times

I have the same question as asked in this question. With the difference that I want to change multiple legend entries. I tried: ...