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)

3
votes
0answers
24 views

Automatic legend does not include all datasets in case of short list of colors

The following code gives legend only for elements with unique color ...
3
votes
2answers
139 views
7
votes
4answers
6k 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.
0
votes
2answers
64 views

Changing font size and style in VectorDensityPlot

I have this: VectorDensityPlot[{x, -y}, {x, -5, 5}, {y, -5, 5}, PlotLegends -> Automatic] and want to: 1) Add a label to the column bar legend on the side ...
0
votes
0answers
22 views

How to use BarLegend on a personalized color function

as the title says i have to show a BarLegend for a graphic built from a matrix. The function used to determine the color of the elements of the curve is $$ { 1 - 1/3 (msum[[i, j]] )^b, 1 -(msum[[...
-1
votes
3answers
68 views

How to use SwatchLegend in Show? [closed]

Let us suppose i have two graphs for sequences A and B as follows ...
3
votes
1answer
54 views

Place Legend above Epilog

I am currently struggling with a problem which I haven't seen answered anywhere else. I want to make a ListDensityPlot graph in which I need to draw some ...
4
votes
2answers
67 views

Adding lines and labels at custom positions in BarLegend

Currently my BarLegend looks like: BarLegend[{(ColorData["Rainbow"][Rescale[#, {0, .125}]] &) , {0, .11} }] I would like to add white (maybe dotted) lines ...
58
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 ...
6
votes
1answer
99 views

ArrayPlot gives wrong plot legend, how to fix?

Bug introduced in 10.0 and persisting through 10.4.1 My minimal working example is the code ArrayPlot[{{1, 0.1, 0}, {0.1, 0, 0}}, PlotLegends -> Automatic] ...
5
votes
1answer
365 views

How do I produce a BarLegend with the default coloring of a ContourPlot, using Legended?

I have a series of ContourPlots that I want to compare in a GraphicsRow environment. I want to add a single legend for all three ...
0
votes
2answers
63 views

Grid: How to assign a common legend to multiple plots?

I made four plots, named Fig1~Fig4. Then I used Grid to put them together in one figure. Now I wish to add a legend in the bottom of the last figure. ...
2
votes
2answers
106 views

Change or force plot legend marker symbols

I am wondering if there is a way to force the plot legend symbol for each respective plot. I am currently using a package created by AlexeyPopkov, which corrects the off-centre plot marker issue very ...
5
votes
3answers
139 views

Show and PlotLegend row spacing

In this toy example I make some plots, each with a legend, and combine them with Show. All the legends are assembled into a column which is helpful but it is too high for the size of plot. How can I ...
4
votes
2answers
62 views

How to make height of PlotLegend the same as height of plot which has a fixed horizontal width

This is a problem of Legends in density plot. As pointed out by this post. Generally we want to same height of legend bar and plot. The code for the basic case is ...
0
votes
1answer
83 views

Add color bar in SphericalPlot3d in version 8

I want to add a color bar in my spherical plot. I have tried the BarLegend command in version 8 but it seems not working. Could anyone help me out a bit? I wrote ...
2
votes
2answers
80 views

BarLegend problem when rescaling color of multiple vectorplot

I want to make multiple vector plot at same color scale with same BarLegend. Similar posts are (1), (2) I made a minimal example to show the problem I encountered ...
15
votes
5answers
550 views

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

Bug introduced in 10.1 or earlier and persisting through 10.4.1.0 or later This answer explains how to change various undocumented options for BarLegend with <...
1
vote
2answers
498 views

What is the best way to export a table of numerics with legends ready for Word?

I want to put my table output into an MS Word document without having to edit it in word after, so I want to export it ready for Word in final version with complete legends and title. Is it possible ...
1
vote
2answers
78 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 ...
10
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
521 views

Plotting legends in contourplot

In Mathematica 8. Given this: ...
1
vote
2answers
54 views

Colour bar for contour 2D graph [duplicate]

How could I plot the colour legend for my 2D contour graph ...
2
votes
1answer
61 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
61 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
72 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
258 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
31 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
133 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
95 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
403 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. ...
2
votes
0answers
67 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
708 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
444 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 PlotLegends,...
0
votes
1answer
94 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
66 views

TargetUnits in BarLegend

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

LineLegend is behaving erratically

The top one is fine, but if I change Red into dashed version, it behaves erratically.
2
votes
1answer
94 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 ...
44
votes
7answers
25k 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 experience,...
5
votes
2answers
86 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
102 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
85 views

Does PlotLegend lie in a figure?

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