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)

6
votes
1answer
90 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] ...
4
votes
2answers
64 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 ...
0
votes
2answers
58 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
96 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
134 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
59 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 ...
2
votes
2answers
79 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 ...
0
votes
1answer
77 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 ...
1
vote
2answers
54 views

Colour bar for contour 2D graph [duplicate]

How could I plot the colour legend for my 2D contour graph ...
0
votes
0answers
39 views
2
votes
1answer
60 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
1answer
60 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
70 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 ...
0
votes
1answer
30 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
120 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
92 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 ...
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
62 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
93 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
64 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 ...
5
votes
2answers
78 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 ...
4
votes
3answers
182 views
2
votes
2answers
83 views

Does PlotLegend lie in a figure?

I wonder if PlotLegends is part of a figure. Indeed in the code ...
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 ...
1
vote
2answers
80 views

Problems with formatting PlotLegends text [closed]

To avoid issues, I post here the photo to explain you better what my problem is. So what I would like to have, is a "correct" writings of the legend text for the Blue function. I would like it to ...
4
votes
2answers
219 views

Making a better looking plot legend

I want to plot two (or more) functions, inserting in the plot itself the legend that will clarify me what are those plotted functions. I know this basic standard command lines: ...
1
vote
2answers
119 views

Matching colors in BarLegend and colorfunction

How I can use Hue as color function in BarLegend in this density plot? ...
4
votes
4answers
240 views

Combine multiple swatch legends

How can I combine multiple SwatchLegends? As a minimal example: ...
5
votes
1answer
112 views

inset legend from top right corner / find size of swatchlegend bounding box

The question is the following. Using Inset, we can insert a legend in a Plot (in a Graphic, in general). E.g. ...
2
votes
1answer
151 views

BarLegend too large for plot in version 10.3

In previous versions, the following code, taken from here from @kglr, used to give a reasonably sized legend, but in version 10.3 gives a huge legend. ...
1
vote
1answer
105 views

How to border legends in ListLinePlot

I'm trying to use ListLinePlot for 3 data sets, and I want to put borders for my legends. Here is my code: ...
1
vote
1answer
96 views

Is it possible to use vectorized Plot Legend?

I upload data using the following code data = Import["L" <> # <> ".dat"] &/@{"10", "102", "103", "104"}; My function is ...
1
vote
1answer
135 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
2answers
68 views

Formatting legend text font multiple times

I have the same question as asked in this question. With the difference that I want to change multiple legend entries. I tried: ...
0
votes
1answer
153 views

Plot legends not displaying correctly

I'm having an issue with a notebook I'm running. I'm generating a bunch of plots, but the legends aren't showing up correctly. I generate a bunch of plots every time I run the program so I wrote a ...
7
votes
2answers
117 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 ...
3
votes
1answer
203 views

Customizing a graph (Dashing, PlotMarkers, Labeled)

There are actually several questions here but I thought they are closely related so I should not split into several posts. Here we go... I have the following list ...
2
votes
1answer
71 views

Map inside LogLinearPlot with legends and different colors [closed]

I have been trying to use Plot with a nested map to make plots of a numerically integrated function with different argument parameters, and after some searching I have finally got that sorted. My MWE ...
1
vote
1answer
62 views

Using PlotLabel with ParametricPlot

I cannot get the label to appear on this vertical line! (Mma 9.0.1 OS 10.8) ParametricPlot[{.5, t}, {t, 0, .5}, PlotStyle -> Blue, PlotLabel -> "z"]
1
vote
1answer
102 views

How to change the spacing of line in legend?

Given this plot: ...
3
votes
2answers
181 views

How to set original color of markers in plot legend?

I tried to make a plot markers manually as follows ...
1
vote
0answers
37 views

Update plot legend after using drawing tools [closed]

After manually editing a plot by changing the colours and filling of the curves using the drawing tools, is there any way to update the legend, so that it corresponds with the new colours?
6
votes
2answers
218 views

LineLegend behaves differently in ListPlot in Mathematica Version10.0 or later

Suppose I want a line legend for a list plot: ...
15
votes
5answers
510 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 <...
6
votes
2answers
168 views

PlotLegends “Expressions” default for ListPlot?

gwr pointed out an apparent problem with setting a default Option value of PlotLegends for DateListPlot. I traced the problem ...
0
votes
0answers
35 views

Adding a legend to ListContourPlot [duplicate]

I am struggling to add a legend to my plots. I am using ListContourPlot and my data is ASiAufrontZnO, which is an array of data with three columns ...
9
votes
2answers
442 views

Getting a correct custom legend for contourplot?

I am having trouble making a custom range for a legend in ContourPlot since the legend doesn't "talk" to the PlotRange and ...