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
4
votes
1answer
103 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 ...
6
votes
1answer
277 views

How to Inset a legend in GeoGraphics with Scaled LegendMarkerSize?

I have a GeoGraphics where I am using Scaled in PointSize to include size information. I ...
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
184 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: ...
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
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
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
0answers
189 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: ...
0
votes
1answer
126 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 ...
0
votes
0answers
97 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 ...
2
votes
2answers
819 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 ...
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, ...
9
votes
1answer
2k views

Make Legend dot larger

I am having trouble making the dot marker for Cosec(x) larger. The plot points should be size 1% but the legend marker is super tiny and I don't know how to make it larger. ...
2
votes
1answer
381 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. ...
0
votes
1answer
200 views

Adding a second color bar to a plot

Here comes a sample set of data ...
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: ...
11
votes
4answers
378 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 ...
6
votes
2answers
343 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 ...
3
votes
1answer
204 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 ...
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
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 ...
2
votes
1answer
610 views

Contour plot that excludes regions outside of a constraint [closed]

In the attached figure, I calculate the minimum value of the dependent variable represented by the bar legend. This minimum value is based on NonlinearModelFit and ...
2
votes
0answers
330 views

How to add a Bar Legend to a density plot over the surface of a sphere?

I have a function with variables (theta,phi) the spherical coordinates. I want to represent it as a density plot over the surface of a sphere. following an answer to a previous question Density ...
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
80 views

How to add a common color-bar to a set of 2d maps produced from evaluating a function along three projections in Mathematica 8.0?

In our simulation, we are assigning neutral hydrogen gas to dark halos as a result of which a distribution of neutral hydrogen is established across each dark halo represented in the form of a ...
1
vote
1answer
139 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. ...
0
votes
1answer
452 views

Problems with legends for list density plots [duplicate]

When plotting list density plot in Mathematica 8.0, the following problems arise: PlotLegends doesn't work, so I use ShowLegend...
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
774 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 ...
1
vote
1answer
574 views

Position Legend for Bode Plots

I am having a problem placing my legend inside a bode plot (magnitude or phase - any would do). I cannot find any command that lets me do so. My command for bode plot is ...
3
votes
2answers
556 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 ...
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
1answer
506 views

Exporting Legended plot with image resolution

I am trying to export an image in the following way: p1 = Plot[Sin[x], {x, -3, 3}] Export["sinx.jpeg", p1, ImageResolution -> 1200] The exported image in this ...
3
votes
1answer
1k views

How to create a bar legend of a contour plot that contains labels of the extreme values?

I have been struggling recently to get a bar legend appearance the way I want. I have a contour plot which shows a transmission coefficient going from 0 to 1, with 9 contours (constant 0.1, 0.2, ..., ...
3
votes
2answers
146 views

BarLegend display Pi [duplicate]

BarLegend["LakeColors", {0.2, 0.4, 0.6, 0.8}] I want to display Pi in the BarLegend. I can do similar thing in FrameTicks like this ...
-1
votes
1answer
63 views

Not getting properly formatted legend labels [closed]

So I have this problem: I'm having to plot the Exponential Integral and another function, but when I come to write the legend to make it to appear in the plot, I don't get the function with the ...
4
votes
1answer
499 views

Legend color lines not visible

I try to plot several curves on one plot with legends, but the colors assigned to each curve are not showing in the legends. ...
6
votes
2answers
572 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: ...
1
vote
1answer
799 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 ...
1
vote
1answer
379 views

ArrayPlot with logarithmic legend

I have a matrix that contains numbers in different orders of magnitude and I would like to plot it using ArrayPlot. For example purposes I create the matrix here, ...
3
votes
1answer
197 views

PlotLegends output graphics do not include legends when manually selected

I've noticed (in v11.0.1 and v10.3.1) a small problem with the graphic produced withPlot and the PlotLegends option: if you try ...
2
votes
2answers
2k views

Adding legends when using Show

I want to show my students that $f(x)=2\sin x-3$ and $f^{-1}(x)=\sin^{-1}\dfrac{x+3}{2}$ are inverses of one another via visual evidence; that is, $f$ and $f^{-1}$ are reflections of one another ...
3
votes
1answer
185 views

Legend is too long

I've a problem with the legend of my graph. I've customized the graphs of my papers in an acceptable way for the a lot of journals. But this time I've two problem: Is there a simple way to write the ...