Questions tagged [legending]

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.

Filter by
Sorted by
Tagged with
2
votes
2answers
537 views

Changing the width of BarLegend with Contour argument

Bug introduced in 10.0.2 or ealier and persisting through 11.0.1 or later Is it possible to change the aspect ratio of the BarLegend in Mathematica? The option <...
2
votes
2answers
161 views

Multi-legend issue in ChartLegends?

Been fiddling around with the legends and trying to place one in each corner and I bumped into an issue: ...
6
votes
2answers
406 views

Control the tick marks in BarLegend

Consider a BarLegend showing a smooth gradient, like this one: ...
5
votes
2answers
571 views

Making a rectangular label for RegionPlot

I have a plot that includes a RegionPlot. I want to make a rectangle with the same shading as in the region plot to show as a legend. The dumb way I can think off ...
1
vote
1answer
55 views

How to get legends to show up for a plot of an ODE with differing initial values? [closed]

I'm trying to get legends for different initial values for the solutions to an ode to show up. I currently have ...
6
votes
2answers
935 views

How to reverse the gradient and ticks in BarLegend

I created a plot with a horizontal BarLegend for TemperatureColors (see1). Code: ...
4
votes
3answers
503 views

Table in a Legend

Calculated data: ...
0
votes
1answer
131 views

Scatter plot with bar legend [duplicate]

I have two data sets: xy = {{x1, y1}, {x2, y2}, ...} z = {z1, z2, ...} I want to plot at each (xi, yi) a point in a two ...
42
votes
5answers
12k 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'...
5
votes
3answers
611 views

Reverse colors in color scheme

I have a SwatchLegend with a color scheme: ...
3
votes
2answers
125 views

How to add PlotLegends only once in a Table[Plot[]]?

How do I obtain only one Legend in the following case? I would like to obtain only one "a" and one "b" legend on the side, with two different colors. This means that I want a colored legend for 10 z^i ...
12
votes
1answer
345 views

ArrayPlot gives wrong plot legend, how to fix?

Bug introduced in 10.0 and fixed in 11.2.0.0 My minimal working example is the code ArrayPlot[{{1, 0.1, 0}, {0.1, 0, 0}}, PlotLegends -> Automatic] The plot ...
1
vote
1answer
166 views

TogglerBar and Legend color mismatch

I have this piece of code ...
0
votes
1answer
84 views

PlotStyle a particular curve

Let me give an example ...
0
votes
1answer
237 views

How do I make a custom marker for my plot legends?

I have written the code to make some plots and now I want to add legends to them. I want to have the type of legends shown in the picture below; i.e., two lines corresponding to each parameter ...
19
votes
2answers
24k views

Formatting legend text font

I am using this code to plot a graph, and I am trying to make the font of the legend bigger. ...
0
votes
1answer
213 views
1
vote
1answer
350 views

Placing a bar legend right up against a ListDensityPlot

I want to place a bar legend right up against a density plot. Here are what I have tried ...
0
votes
1answer
31 views

Adding legend to plot when using append

I am making a plot using ...
0
votes
1answer
303 views

How to show Plot Legends? [closed]

How do I make the PlotLegends works in the codes below? I had tried the "Expressions" option and other string options. Only the Ture option will give one legend but not all legends. ...
2
votes
1answer
149 views

Plot with PlotLegends -> “Expressions” doesn't show all expressions in Legend [duplicate]

So I'm basically trying to plot a table that has multiple versions of (x^4)+(cx^2)+x, with c being an integer. I've gotten the expressions to all be graphed, however I can't seem to have the legend ...
2
votes
1answer
126 views

How to place the legend immediately to the right of the frame?

I tried using Placed[legend,{1,0.5}] but it leaves some unnecessary gap between the right frame boundary and the legend. I know there is a way to use nested ...
8
votes
1answer
529 views

Problem with custom ticks in BarLegend in Mathematica 11.1

Bug introduced in 11.1 and persisting through 11.2.0 I think the bar legend custom ticks are automatically sorted in Mathematica 11.1. Am I making some stupid mistake here or is it a bug? This is ...
5
votes
1answer
1k views

PlotLegends is obsolete in v10?

I am using Mathematica 10.0.2.0 on a Mac OS X (Yosemite v. 10.10.1, 64bit). After I call: Needs["PlotLegends`"] I get the info: General::obspkg: PlotLegends` ...
1
vote
2answers
155 views

Color disparity in legend and graph due to opacity

I have the following graph: Due to opacity, my legend coloring is not matching my graphs and it might be confusing. Is there any remedy? I could not get the coloring what I wanted due to the opacity....
0
votes
1answer
126 views

Rotate one plot and add legend tp another [closed]

I have one function and some data that I want to plot together. I have two questions. How can I have a legend for dataMC list plot? How can I rotate the ...
1
vote
1answer
70 views

How to improve a color in a legend to customly-made markers?

I am plotting some experimental results with ListPlot and use customly made plot markers. To be specific, here is my data: ...
0
votes
2answers
86 views

How to give legend to such a plot [closed]

The Plot is as given on the Mathematica website ...
2
votes
2answers
1k 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 ...
3
votes
2answers
786 views

How do I control the spacing and font size for my plot legend?

I have a Manipulate-based figure in which I'd like to place a compact legend in the upper left corner (within the figure's frame). But by default, the items in the ...
3
votes
2answers
435 views

Contour Plot with 2 Legends

I want to redefine the legend contours within a specific region of my plot. Someone posted a picture of a plot on here, but didn't describe how they generated it. I want something similar, where I ...
2
votes
3answers
3k views

How to color a contour plot over a subset of colors displayed in the bar legend

This seems real easy but I can't find the answer. I have a few contour plots that I am combining and want to use only one bar legend that captures all the values. Given that I know the range of values,...
2
votes
1answer
247 views

How to add a BarLegend to a ListLinePlot?

I'm trying to add a color BarLegend to a ListLinePlot with multiple lists. With 20+ lists a normal Legend gets long and bulky. ...
5
votes
3answers
1k views

How can I get thicker lines in the legends of a ListLinePlot?

I want to have thicker lines in the legends of this plot: ...
1
vote
1answer
147 views

Frame around elements of swatch legend

I'd like to put a frame around the elements of swatch legend: SwatchLegend[{Red, Green, Blue}, {"label1", "label2", "label3"}, LegendLayout -> "Row"] That ...
1
vote
3answers
434 views

Adding legend to Show

I want to add legend to Show. I tried as below by the help of how to add plotlegends in a show function: ...
1
vote
2answers
404 views

Number format of plot legend

How can I change format of numbers for bar legends. I would like to show numbers without digits after the decimal point. ...
3
votes
0answers
254 views

Exporting a graphic with Legend

I have been trying to export an image (not the image below) with a legend to a pdf format for a publication (Mathematica 11.0.1). Unfortunately everything I have tried exports a version of the graphic ...
68
votes
5answers
26k 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 ...
0
votes
0answers
126 views

Mathematica 11.1 BarLegend Bug Resurrected

I am using Mathematica 11.1 and facing difficulty with BarLegend. When I specify custom ticks using "Ticks" and custom tick ...
2
votes
3answers
519 views

How to put a PlotLegends in this case?

Here is my problem: I have to make a plot in log log scale, and I would like to put a Plot Legend INSIDE the plot (in order to include it into the document with all the specifications). The plot must ...
2
votes
3answers
268 views

Latex Matrix in PlotLegends

I would like to have the expression $$\rho\!\begin{pmatrix}a&b\\ c & d\end{pmatrix}=1$$ as a legend of a plot. When I try (code is adapted from this answer) ...
1
vote
1answer
122 views

Barlegend does not illustrate my colorfunction correctly?

I have defined the following colours and I want to use them for my densityplot. ...
2
votes
1answer
105 views

Enlarge plots and customize plot legends

I am trying to enlarge the plots. They are too small. In particular, I would like the intersection of the curves (sav-curves and depr-curves) to be more evident. Where and how do I implement this? I ...
1
vote
1answer
184 views

How can I access Legend's parameters: LegendLines (thickness, color, dashed) and LegendLables (FontSize, FontFamily FontColor)

How can I access the features of LegendLines (thickness, color, dashed) and LegendLables (Fontsize, FontFamily, FontColor) in the same legend column? I manage to change either of them, but not both ...
2
votes
0answers
282 views

Common legend for two density plots

I have two different density maps, one of them is made by DensityPlot and the another one is made by ListDensityPlot. I would ...
5
votes
1answer
3k views

How to change only the PlotLegend size

I have Plot such as ...
1
vote
1answer
486 views

How to change the size of legend in PointLegend?

data = Get["http://t.cn/RSzJjcb"]; ListPlot[Values[data], PlotLegends -> PointLegend[Keys@data, LegendMarkerSize -> 10]] But the the size of legend is too ...
1
vote
1answer
164 views

Show single legend with approriate color range for a GraphicsGrid

I have a GraphicsGrid of MatrixPlots in the range between 0 and 1 and I want to show a single legend for all of the grid with the appropriate color range. I tried: ...