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.

34 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
112 views

How to set Antialiasing -> False on legend frame

The legend box has antialiasing by default. How can it be switched off? ...
4
votes
3answers
255 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 ...
4
votes
0answers
82 views

Automatic legend does not include all datasets in case of short list of colors

The following code gives legend only for elements with unique color ...
3
votes
0answers
303 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 ...
2
votes
1answer
79 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 ...
2
votes
0answers
52 views

Logarithmic scale in the legend of a GeoRegionValuePlot

Is there a way to make the bar legends show the values 1 to 9000 using a logarithmic scale than what Mathematica is automatically giving me? Here's my plot: The data I am using: ...
2
votes
0answers
307 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 ...
2
votes
0answers
345 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 ...
1
vote
0answers
62 views

How to use MatrixPlot as a DensityPlot?

I have a 1000x1000 matrix the MatrixPlot of which gives this graph: The code is ...
1
vote
0answers
32 views

Evaluate and PlotLegends

Related to this question here. I dont understand why Evaluated->True does not behave properly when also using PlotLegends. For example, running the code below ...
1
vote
0answers
32 views

How to set the magnitude of the colors in DensityPlot?

I have used the DensityPLot to show two functions $f_1$ and $f_2$ in different regions. I want to combine them using the Show function. The problem is, the colors are not consistent in the two ...
1
vote
0answers
40 views

Assigning labels to numbers in ListContourPlot

I am trying to plot some 2D data using ListContourPlot. The quantity to be plotted has only three discrete values 0, 1, 2. While plotting them, I want to assign these numbers some labels say A, B, C, ...
1
vote
0answers
42 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 ...
1
vote
0answers
34 views

Difficult to differentiate different line style , when we convert into eps and import into latex

Question 1 How to place the legend on top of the plot, I used Placed function to put a legend on top of the plot, but it is not working. Question 2 The moment If I export the end result of this ...
1
vote
1answer
151 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 ...
1
vote
0answers
57 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
84 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 ...
0
votes
0answers
19 views

Proper plot scaling with 3 y-axis scales

I used the answer from @bobthechemist to produce a graph with three y-axes. The data and code can be found in this Mathematica notebook on Dropbox, ready for use. The series have 93 observations each ...
0
votes
0answers
30 views

Number of columns in PlotLegends

Is there a way to set the number of columns used in PlotLegends? Found this answer but it is for LegendLayout: LegendLayout ...
0
votes
0answers
32 views

Let `PlotLabel` use data set names in a list of plots

In the code below, how to make PlotLabel automatically show the name of the data sets (i.e., aa, bb, cc)? ...
0
votes
0answers
28 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 ...
0
votes
0answers
42 views

ListLogPlot with Legends inside the plot frame

I'm trying to do ListLogPlot for the two lists of points ...
0
votes
0answers
52 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"]; ...
0
votes
0answers
34 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 ...
0
votes
0answers
54 views

Skip legend entries when using the PlotLegends option in Plot[]

(This question seems so basic that I have a hard time believing it hasn't been asked yet, but I couldn't find it, so here goes.) Is it possible to skip items in the legend when using the ...
0
votes
0answers
33 views

customize plot legends of different plots

I am generating figures for research paper on mathematica v. 11.0.1. I have some issues with the length of plot legends. The problem is the length of the legend line. ...
0
votes
0answers
35 views

Dynamical PlotLegends with two indices

I need to plot several eigenvalues from different matrices, so I would like to know how can I change the name of the curve with each set of matrices-eigenvalue. What I am doing is the following: <...
0
votes
0answers
57 views

PDF export on macOS Mojave does not show axes correctly

I am using Mathematica 11.3.0.0 on macOS 10.14.3. I found something goes crazy when I exported a plot with legends. In the notebook, everything seems fine Then I used the export command to export it ...
0
votes
0answers
104 views

How do I get a beautiful image overlay from data and a model function?

I have a set of experimental data that I wish to make into a density plot. Then I have to overlay an image of a model function f(x, y, z) = Sin(x/z)Sin(y) on the ...
0
votes
0answers
243 views

PlotLegends on DensityPlot

I have plot DensityPlot[100*Exp[-x^2 - y^2], {x, -2, 2}, {y, -2, 2}, PlotLegends -> {Automatic}] I wanna see the PlotLegend only in range 0 to 10. How do it?
0
votes
0answers
114 views

Broken lines in exporting pdf of 3D plot in Mathematica 10

I want a 3D-plot with mesh lines as written in the code below: ...
0
votes
0answers
55 views

Displaying legends in displacement plot of Van der Pol oscillator on MATHEMATICA 8.0

I am trying to draw different plots of Van der Pol's oscillator displacement (ListPlots and ListLinePlots) using 'Show'. I have a problem drawing the legends. Here are my codes: ...
0
votes
0answers
130 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 ...
0
votes
0answers
106 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 ...