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
0
votes
1answer
213 views

How do I use a custom palette in the legend bar?

I have defined a custom gradient palette as follows: ...
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 ...
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) ...
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
122 views

Barlegend does not illustrate my colorfunction correctly?

I have defined the following colours and I want to use them for my densityplot. ...
1
vote
1answer
477 views

BarLegend not accepting Ticks Option

I am using Mathematica 11.1. It says that Ticks is not an option for BarLegend and I don't know how else to specify the number of labels which appear in a Bar Legend object. All the pages I have ...
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 ...
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 ...
2
votes
1answer
189 views

Providing common bar legend and color scaling over multiple 3D plots

Data for plot ...
5
votes
1answer
3k views

How to change only the PlotLegend size

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

Legend Missing In The Plot

I tried to save the plot P1 by right clicking on the plot and pressing save as. I found that the PlotLegend is not saved. Please help. ...
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
183 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 ...
1
vote
1answer
163 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: ...
4
votes
1answer
104 views

PlotLegends and ColorConvert interact badly

I want to make a plot, then check how it looks in GrayScale. If I use PlotLegends->Automatic, this isn't an issue: ...
0
votes
1answer
46 views

SingleletterItalics placement [closed]

I am trying to render a text on a graphics. ...
3
votes
1answer
8k views

Specify legend position in a plot

I would like to place the legend inside the plot frame. I have been doing a search in the documentation but only found option ...
2
votes
1answer
71 views

LegendMarkerSize: width ignored?

The following code fails to set the width of the BarLegend correctly, even though the height is adjusted properly. Why? (I am using Mathematica 11.1) Edit: Minimal code ...
3
votes
1answer
283 views

Using Legended with a black background

I'm trying to use Legended to add a legend to a plot that has a black background. I can make the background of the legend to be black as well, but there is a white ...
1
vote
2answers
186 views

How to show the label in BarLegend in Degree

I would like to get label in BarLegend[{"TemperatureMap", {-Pi/2, Pi/2}}] to be from -90 ° to ...
3
votes
2answers
646 views

Set background color in BarLegend

I have a complex Graphics3D and would like to include a BarLegend, such as: ...
0
votes
0answers
98 views

A better way of formatting equations in plot legends

Maybe this is a bit of trivial question, but here goes. I often think it is convenient to label a plot legend with an actual function - especially if it is a fit to some data or something. Typically ...
0
votes
1answer
127 views

How to generate common axes with GraphicsGrid and save plot as pdf when using Legended without cell number

I would like to remove y-axes with keeping plot's consistency and then save it as pdf without cell number (I used save selection as), it is Ok if saved as an image but not working with pdf?! Here the ...
3
votes
2answers
58 views

How exactly is the argument supplied if an explicit function is given as LegendLayout?

The documentation of LineLegend, PointLegend etc. says: The layout specification f is applied to the table of values {{col1, ...
2
votes
1answer
385 views

Changing the size of a Chart Legend

I'm trying to get a reasonable match for the following PieChart. I understand how to make the piechart, tweak the colors, placement of labels, etc. ...
6
votes
1answer
250 views

Make Plot Legend Wider

I have a pretty plot with a legend But I want to make the legend the same width as the graph, i.e. causing all the text to be on one line. Code to make the legend here: ...
0
votes
1answer
201 views

Adding a second color bar to a plot

Here comes a sample set of data ...
3
votes
2answers
339 views

How to plot a legend according to a given scale, separately?

Suppose I have plot a ListDensityPlot graph, the value of the density is between xmin and ...
5
votes
1answer
111 views

PieChart and legending issues

I'm trying to do some bar charts and pie charts in Mathematica, but I can't figure out how to make the legend colors correspond to the actual colors on the charts. I'm running ...
0
votes
1answer
144 views

How do I generate legends for Plot[.] objects in Mathematica 8 [duplicate]

I have an old version of Mathematica 8 and can only find information for #>9 I need to label multiple curves in a Plot[.] function with legends to the side of the graph. Your answer needs to be as ...
6
votes
2answers
345 views

Perfect vertical alignment (centering) of PointLegend markers and their labels [duplicate]

I want to produce a stand-alone PointLegend for a bunch of plots which I generated. Unfortunately, the markers are slightly off-axis. I have applied all the options ...
6
votes
1answer
102 views

From where comes Opacity[0.3] in PointLegend?

In PointLegend we have (checked with versions 10.4.1 and 11.0.0) EdgeForm[Opacity[0.3]] by default applied to ...
5
votes
0answers
106 views

How to set Antialiasing -> False on legend frame

The legend box has antialiasing by default. How can it be switched off? ...
4
votes
2answers
142 views

Spacing of contours in BarLegend (Ver. 10 vs 11)

I recently started using Version 11, and I encountered the following problem. I use this code to make a contour plot: ...
1
vote
0answers
53 views

Export plot in pdf format using legendMaker

I am playing with the function legendMaker coming from the answer of this question. I am using same data form answer. ...
1
vote
0answers
190 views

PlotLegends is not working or may be I don't know how to use it [duplicate]

I am not able to use Plot legend properly. In my case I do have many colors but I don't know how to use Plot Legend judiciously. Any help will be highly appreciable. Example: ...
4
votes
1answer
179 views

PlotLegends disappearing with list of functions

Bug introduced in 11.0.0. Fixed in 11.1.0. Why is it that: Plot[{x^2}, {x, 0, 1}, PlotLegends -> {"a"}] does fine, but: ...
1
vote
1answer
140 views

How to shade color in bar legend [closed]

I have customized the bar legend I need for my contourPlot but I need a sort of shade between each two of them, like "Hue" function. ...
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
162 views

PlotLegends in 4D plot

I have a data set consisting of 4 points. Each point has 4 columns. I want to plot that data set with 4D color function where 4th column of each dataset will be plotted by the color function. The ...
3
votes
2answers
776 views

How do I add a line legend to a list plot?

I want to label a ListPlot using LineLegend with the line colours corresponding to the filling. For example if I use this ...
3
votes
2answers
560 views

Legend plot and vertical line

I could not find something similar. Suppose that I want the lines y=1 and x=1. I can do it with Plot and Epilog or GridLines. But how can I insert the representation of the vertical line in a legend ...
9
votes
4answers
196 views

ChartLegends and BarChart Ignores ColorFunction

In version 11.0.1 it appears that ColorFunction is being ignored for BarChart with grouped data. With ...
1
vote
1answer
174 views

BarChart Legend with scaled coordinates

I can't use scaled coordinates with BarChart: Placed::labpos: "!(\"Inside\") is not a valid position for the placement of labels. ...
3
votes
1answer
90 views

Performance issues of Manipulate with PlotLegends

I always have had performance issues of Manipulate while using PlotLegends, for example take a look at the following minimal ...
2
votes
1answer
128 views

BarLegend not showing full range when indicated inside a function

I am trying to show a BarLegend for a MatrixPlot. I am aware that doing ...
2
votes
2answers
195 views

Does PlotLegends not work in MM 11?

I literally just downloaded MMA11 and upgraded from MMA 10.4, and PlotLegends seems to not work the way it did previously... Kind of annoying. Anyone knows why? <...