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
1answer
17 views

How to specify coordinated of legend box using Show and Epilog functions?

I am trying to place the legend box using epilog function. I'm unsure where I can specify the coordinated in the sample code to specify the position. ...
1
vote
1answer
37 views

PlotLegends don't match the plot's curves

Can anyone help me make the legends(markers) match with the figure curves? I have 2 figures that have three curves each, and then I have to combine them. I used the following code for the first figure:...
4
votes
1answer
31 views

Plotting with sub and superscripts on the PlotLabels

Bug persists through 12.0. I'm trying to produce a plot with PlotLabels that include sub- and superscripts. However, I haven't been able to do it consistently. ...
0
votes
1answer
51 views

Editing the graphic generated by ListDensityPlot

I have generated a graphic using ListDensityPlot in Mathematica, I want to make following three edits to it, but not finding a way. Would be thankful for any advice. How to rotate the graphic. My ...
7
votes
1answer
63 views

Is there a PlotLabels placement such as “Above Left” or “Below Right”, etc.?

I am trying to add labels to a plot in specific positions. I give a simple example: ...
4
votes
3answers
229 views

PlotLegend frame disappears during Export

Bug introduced in 11.2 or earlier and persisting through 12.0 I placed a framed PlotLegend and it works just fine in the notebook, but after exported to ...
2
votes
1answer
66 views

Including legend with reference magnitude in a VectorPlot

I'd like to plot a vector field with a legend for the magnitude of a reference vector. I have read all the document of VectorPlot and found only ...
3
votes
1answer
67 views

How create a general legend which always remain on top of the plot

I am writing a small report, wherein I have several plots, some plots are on a linear-linear scale, some are in log-linear scale, some in log-log. The problem I am facing is every time I change my ...
1
vote
0answers
33 views

Match light-shaded colors to plot themes for RegionPlot

I have a problem very similar to the one in the following topic: Match colors to plot themes. I want to extract the color of a plot for the corresponding legend. However, as I use a RegionPlot I am ...
4
votes
1answer
59 views

Is there any possibility that we can place the the legends manually using mouse

I have a plot in LogLinear scale I wanted to put the legend in the top of the plot horizontally. Can I place this manually, It is extremely difficult to place it through code. this is my customized ...
2
votes
1answer
44 views

Equally spaced contours on a Bar Legend

The function BarLegend[{"Rainbow",{0,1}},4] should result in a bar legend with range 0 to 1 with 4 equally spaced contours. I was hoping to get contours at ...
1
vote
1answer
27 views

BarLegend for custom colour function

How do I change this code so the desired BarLegend is displayed? ...
7
votes
1answer
78 views

`PlotLegends` not showing correct colour

I want to make a Plot with a styled line, as follows: ...
0
votes
1answer
31 views

How to show legends verticaly using ParametricPlot and Show

I am trying to combine 10 different plots using Show. My code has the following form ...
9
votes
5answers
17k views

How to add PlotLegends in a Show function?

I have multiple ListPlot in a Show where i want to add PlotLegends, but adding the PlotLegend...
2
votes
1answer
33 views

How to increase the pointsize of the point-markers in the legend of a cluster-chart?

I start the following mock data set: data = RandomReal[{0, 700}, {10^4, 2}]; I use k to define the number of cluster points: ...
0
votes
1answer
48 views

Are there better ways to plot a continuous scalar function of three variables?

I am plotting a continuous scalar function of three variables with this code: ...
3
votes
1answer
26 views

symbols in legend loose edge

I make my own symbols for plotting: ...
0
votes
0answers
27 views

Change Dimensions of Plot Legend?

I have a ListLinePlot and would like to create a legend which has 21 different data sets plotted with a specific number of rows and columns. I have not been able to ...
1
vote
1answer
38 views

How to add an additional legend that shows the dashing one is using?

I am trying to plot two different functions into a single plot. Each function depends on R and r. I plot against ...
3
votes
1answer
82 views

BarLegend: FrameLabel ruins alignment of BarLegend

Take a simple ContourPlot or DensityPlot with a corresponding BarLegend: ...
2
votes
1answer
26 views

How to match value coloring in Plot3d to value coloring of legend

In a Plot3D I want to change the displayed value range, see the following example. The function generates the values {-1,1}, they are displayed correctly on the z-axis within {-2, 2}, but the color ...
6
votes
2answers
207 views

Why does Rotate in PlotMarkers behave strangely?

Bug introduced in 9.0 or earlier and persisting through 12.0 While answering Change the inner color of markers I came across a behavior that may be a bug. I would like to know if there is another ...
1
vote
1answer
41 views

Filling a region in a plot changes color in legend [closed]

I'd like to mark a region in my plot and after some research in the internet I found the solution I was looking for using the Filling option. ...
2
votes
2answers
85 views
7
votes
1answer
1k views

How to add own description to BarLegend?

Is there a default-option possibility to add own defined names of the contour-labels in BarLegend? I want to have a string "hot" ...
2
votes
1answer
56 views

Callout mystery

I have this function: de[a_, x_] = -1 + (E^-x x^a)/((-a + x) Gamma[a, x]); When I do ...
1
vote
1answer
124 views

Rescaling and Image Padding Issues with GraphicsRow

I am trying to get a row of plots (which include legends and labels) using GraphicsRow, with vertical heights of the plots equal. I manually set the size and image padding of these plots so that the ...
7
votes
1answer
71 views

Formatting ChartLabels for a BarChart with ErrorBars

I have the following BarChart, that uses a custom ErrorBar function to plot error bars: ...
0
votes
1answer
51 views

Title for PlotLegends

Is it possible to put a title to PlotLegends? Say you have chosen PlotLegends -> "Expressions". Now it would be neat to add a ...
0
votes
0answers
39 views

ListLogPlot with Legends inside the plot frame

I'm trying to do ListLogPlot for the two lists of points ...
59
votes
9answers
41k 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,...
0
votes
0answers
36 views

PlotLegend Colors Missing

I want a PlotLegend with the colors of the graphics. p4 = Plot[y1[t] /. s1, {t, 0, tmax}, PlotRange -> All, PlotStyle -> {{Gray}}, PlotLegends -> "Y1"]; ...
2
votes
2answers
36 views

Increasing labelling size in a ListPointPlot3D

...
1
vote
1answer
29 views

How to fix a legend with TraditionalForm

Let this code f[x_]:=Piecewise[{{Sin[x],x>0},{Exp[x], x<=0}}]; Plot[f[x],{x,-5,5}, PlotLegends-> {"f(x)=" TraditionalForm[f[x]]}] Then the part of the <...
3
votes
2answers
125 views

Problem in styling a monochrome plot

I have a set of functions I have plotted them in one single figure. The following are my concerns. 1. I tried to fix the legends for this figure, but unable to do this 2. Is there any way that I can ...
13
votes
3answers
991 views

In version 9 PlotLegends, how can I remove the strange edges that appear around LegendMarkers?

I'm running Mathematica version 9. I am using ListPlot to plot two sets of data. For each data set, I am using different ...
1
vote
2answers
82 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: ...
3
votes
2answers
62 views

Using `PlotLegends` with a `ColorFunction`

Is there a way to put a legend mark with a color function rainbow? For example: ...
0
votes
0answers
20 views

Specify legend inside histogram plot

I am trying to place a legend inside a histogram plot, but Placed["label",{x,y}] as an option in ChartLegends does not seem to work in the histogram environment. Is ...
1
vote
1answer
41 views

Putting legends within the frame of the plot at the desired position

dat1krafull = {{1.`, 2.61594`*^-8}, {10.`, 7.10017`*^-9}, {50.`, 2.1565*^-9}, {75., 1.6567...
3
votes
1answer
44 views
1
vote
1answer
31 views

Behavior of PlotLegends

I want to have a plot of $x^{\alpha}$, where $\alpha$ is an input, and a plot legend which displays something like $\alpha = \# \text{ rad}$ on the following plot, where # is determined by the input. ...
2
votes
2answers
60 views

Putting the text after the line legend

I want to put the line legend after the text, here is my code; ...
10
votes
3answers
581 views

Attaching a legend to BallAndStick picture

I am looking for a way to add a legend showing the identity of various atoms (with different colours) to this picture. Any Clues? ...
1
vote
1answer
38 views

Label with a formal part and a computed part

If would like to print $\left(\frac{b}{a}\right)^2$= (b/a)^2 inside a plot or a graphics where a and b have been seted to certain values so the first part is analytic and the second part (after the =)...
3
votes
1answer
45 views

Customized barlegend changes appearance when placed next to a plot

I created a simple barlegend: barlegend = BarLegend[{Hue[#] &, {0, .7}}] However, when I tried placing this legend next to any plot, the legend appears ...
1
vote
1answer
45 views

Control the size of a Legend

Given the following plot ...
2
votes
1answer
62 views

Label curves with corresponding parameter

How can Plotlegend label each curve with the corresponding value of parameter param in the code below? ...
0
votes
1answer
47 views

Typing custom plotlegend

I have the following ListStepPlot: ...