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)

42
votes
7answers
21k 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 ...
5
votes
2answers
50 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 ...
3
votes
2answers
85 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 ...
2
votes
2answers
70 views

Does PlotLegend lie in a figure?

I wonder if PlotLegends is part of a figure. Indeed in the code ...
15
votes
2answers
1k views

Changing the inter-item spacing in Legends (version 9 and up)

The legending functionality in versions 9 and higher is much easier to use than the PlotLegends package and other bespoke ways of creating legends in earlier ...
7
votes
2answers
84 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 ...
0
votes
1answer
123 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 ...
1
vote
2answers
70 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 ...
7
votes
3answers
151 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 ...
7
votes
1answer
768 views

Font size in PDF export with legended plots not working

I need to export plots as PDF with a given image and font size. Everything is working fine if there is no legend for that plot. However, if I want to export legended plots, the font size is decreased ...
5
votes
4answers
227 views

ContourPlot refuses to show in-figure PlotLegends after turn on ContourShading

I would like to do a contour plot with a label inside the figure itself. For example, the following works well: (note there is a small text "example" at the right bottom figure) ...
4
votes
3answers
976 views

Adding plot legends in version 8

I use Mathematica to draw the displacement, velocity, and acceleration of one point in a graphic. ...
1
vote
2answers
84 views

Matching colors in BarLegend and colorfunction

How I can use Hue as color function in BarLegend in this density plot? ...
3
votes
2answers
163 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: ...
22
votes
7answers
6k views

Using PlotLegends with Show messes up the graphics

I have already obtained the plot that I want but am having trouble legending the graph correctly. ...
4
votes
1answer
224 views

Problem with exporting a plot with a legend to PDF

I've found a simple example that illustrates my problem: ContourPlot[x^2 - 1 == y, {x, -1, 1}, {y, -1, 1}, PlotLegends -> "Expressions"] When I try to export ...
4
votes
4answers
220 views

Combine multiple swatch legends

How can I combine multiple SwatchLegends? As a minimal example: ...
5
votes
1answer
81 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
131 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
74 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
88 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 ...
31
votes
7answers
6k views

Sizing cells in a GraphicsGrid/GraphicsRow

I would like to add a colour bar to a plot. I tried to use GraphicsRow for this. In a GraphicsRow, each item is given the same ...
2
votes
1answer
229 views

logticks in a colorbar

I have a question on using logarithmic ticks in a colorbar in Mathematica 8.0 . I use the package ColorbarPlot (...
1
vote
1answer
76 views
1
vote
1answer
79 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 ...
4
votes
2answers
350 views

In LineLegend, how do I force the legend entries to appear in a single column?

I want to create a single column LineLegend with at least 12 different entries. Suppose that I define lists colors and ...
12
votes
3answers
272 views

How can I change the thickness of tick marks in BarLegend?

Bug introduced in 10.2 or earlier and persisting through 10.3.0.0 or later This answer explains how to change various undocumented options for BarLegend with ...
1
vote
2answers
60 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: ...
4
votes
1answer
179 views

puzzled with ColorData [closed]

At first let me thank, from this point as well, those that they replied to my previous queries. From a reply I got, I obtained finally the desired graph. ...
17
votes
5answers
2k views

Make legend same height as plot

One common style for density plots is to have a vertical legend that is the same height as the plot itself. Some example density plots from Google Image search: How can we make DensityPlots with ...
0
votes
1answer
172 views

Fixed colors for fixed values in contourplot legend

I am trying to make a contour plot of a gravitational potential, consisting of a sum og different potential.s. I would like to plot them separately with a BarLegend that has the same colors for the ...
3
votes
1answer
152 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 ...
8
votes
2answers
12k views

Plot legend inside a Show [duplicate]

Possible Duplicate: Using PlotLegends with Show messes up the graphics I have created a composite plot function: I want to add a legend to it, however ...
3
votes
1answer
696 views

Exporting 3D plotted figure complete with legend ready for Word

I have one more problem, still with exporting full quality 3d figure into Word. I want perfect quality in a Word document of a 3d figure prepared with legend (traditional form of text). Extremes of ...
13
votes
3answers
6k views

How can I save both the plot and the legend together?

In this example, how can I put the legend inside the graph? Currently, when I save the graph, only the graph is saved, not the legend. ...
2
votes
1answer
58 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
58 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"]
12
votes
3answers
6k views

Legend of a plot: how to increase the size of the line/marker?

I'm using the following kind of code to do the legends of my plots: ...
3
votes
2answers
157 views
1
vote
0answers
34 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?
4
votes
1answer
149 views

Boundaries of graphical objects not displayed correctly

Bug introduced in 10.0.0 and fixed in 10.0.1 I have encountered two situations where Mathematica 10 is mishandling the outer pixels of plainly simple objects. I input this: ...
5
votes
2answers
144 views

BarLegend using Function that uses Blend

Bug introduced in 10.0 and fixed in 10.1 I'm sorry if this is a duplicate, but I don't even know how to look for it. I had this line of code that worked on a Notebook I wrote on Mathematica 9.0: ...
6
votes
2answers
168 views
6
votes
2answers
149 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 ...
10
votes
3answers
339 views

Match colors to plot themes

How do I get the colors to match the plot theme when I use a PlotLegend that is separate to the plots? I have had a look at How to access new colour schemes in ...
2
votes
1answer
113 views
15
votes
3answers
2k views

How can I change the size of the plot markers

I use ListPlot in order to plot four sets of data and also insert legends in my plot. Here is the Mathematica code ...
0
votes
0answers
34 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 ...
8
votes
2answers
289 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 ...