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.

49 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
162 views

How to set Antialiasing -> False on legend frame

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

What is the simplest way to get "Input" appearance in the legend?

I wish to get the complete "Input" appearance of the contents of the legend on my plot: the font, its style, and syntax highlighting should be the same as ...
2
votes
0answers
33 views

Straight font in formulas

I'm trying to make a legend to a ListPlot. There is the problem, several letters are displayed in itallic and some in the plain slant. How can I fix this?
2
votes
0answers
98 views

How do I perform volume rendering on image slices imported from a directory on my local machine?

I have a set of image slices (in .MHA and DICOM formats) in a folder on my local machine. I will like to import these slices, perform rendering to get 3D volume, perform "ClusterComponents" ...
2
votes
0answers
38 views

Strange behavior when placing a Legend on a GraphicsRow, Column or Grid

Consider the following example: ...
2
votes
0answers
100 views

Combining PlotThemes, PlotMarkers and Plot with MaTeX used on Labels, Axis Labels and Legend

Summary I am currently attempting to make some of my earlier plots more fit for black-and-white printing, while keeping color and typesetting in TeX/Latin Modern Roman. While at it, I tried to ...
2
votes
0answers
32 views

Add a normal legend to an MMA plot in SciDraw

How can I add a legend to a standard Mathematica plot object that is embedded in a FigurePanel in SciDraw? Ideally, I'd like to be able to use this in an iterated Multipanel. I believe (from this ...
2
votes
1answer
225 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
114 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
413 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
35 views

ListlinePlot 3D How to make color bar match the z value

The code is like this: ...
1
vote
0answers
43 views

How to fix color region of bar legend after removing many points in a dataset in ListPointPlot3D?

I am stuck in how to fix color region of a bar legend after removing many points in a datalist. I think it is easier to understand with MWE. First of all, I have generated 1000 points with the below ...
1
vote
0answers
35 views

Getting PlotLegend to show the exponential of values?

I made a contour plot in Mathematica, and am currently using PlotLegends->Automatic. But, instead of having the legend labels show the values of the function, I want it to show the Exp of the ...
1
vote
0answers
27 views

Issue displaying units with Quantity[] inside bar legend

Quantity[] is displaying some inconsistent behaviour when used in BarLegend[]. Compare the following two examples: ...
1
vote
0answers
63 views

ContourPlot - how to show linear values on log plot and how to expand the PlotRange for linear plot

I have been struggling with this problem for long and I finally decided to post it. How do you change the range of contour plot or decide what contours to show? Also when your contour is in the log ...
1
vote
0answers
65 views
1
vote
0answers
100 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
73 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
36 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
54 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
82 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
42 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
0answers
65 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
100 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
38 views

Is possible to put multiple independent legends into Graphics?

In the following Graphics I'd like put on the left and below another legend where I indicated the scale of the plot: I tried to do this putting into Inset the command PlotLegends->{} but ...
0
votes
0answers
25 views

Adding a legend to a ColorFunction Line

I have a plot with a color-varying line, and am looking to make a color-varying LineLegend to accompany it. However, ColorFunction doesn't work for legends it seems, so I'm not sure how to manage this....
0
votes
0answers
55 views

Adding a legend to Overlay

Does anybody know how to add plot legend to an Overlay in Mathematica? I had to make a plot with 2 different y-axis, so I produced two plots and joined them by Overlay, but now have no idea how to add ...
0
votes
0answers
13 views

BarLegend Adds extra swath of color to the top

I am trying to generate a bar legend for data between 2.00*10^(-8) and 0.0021. What I have currently is: ...
0
votes
0answers
40 views

Plot legend markers with type of line

I want to put the markers symbol and the line type together in the Plotlegend. I have used the following code ...
0
votes
0answers
44 views

How to add a legend in a Mathematica Graphics package?

Suppose that I have Graphics[ {{Point[{0,1}], Black},{Point[{1,1}], Blue}}] which plots a black point and a blue point next to each other. Now, I want to add a ...
0
votes
0answers
50 views

LegendFunction and MaTeX

I have started using MaTeX (excellent package to integrate Latex in your wonderful Mathematica generated plots). I am getting a warning in generating the following plot ...
0
votes
0answers
41 views

VectorPlot BarLegend: color for direction and opacity for magnitude?

Implemented below, I'm working on a vector field plot where the background color indicates the vector orientation and its opacity for the vector norm. Therefore I'd like to have a ...
0
votes
0answers
36 views

Plot complex integration contour

I want to draw the the contour {z, 0, -2, -2 + I 10^3, I 10^3, 0} and maybe highlight different parts with different colours. I can’t find the suitable function.
0
votes
0answers
45 views

How to get Callout and Text[...,Offset[...]] to use the same coordinate system in Mathematica 12?

I could have sworn this worked in a previous version of Mathematica, but when I transcribe the coordinates used to label text offsets, I get errors like ...
0
votes
0answers
73 views

How to plot a function using a table particular values

I would like to plot the following function in terms of kR, but using specific different values, I think the best easy way is using a Table. This is a common useful problem to explore numerical the ...
0
votes
0answers
79 views

How is the default bar legend of GeoRegionValuePlot defined?

I want to modify the default bar legend of GeoRegionValuePlot but I can't find any documentation on how it is defined. Is it possible to get the default legend from ...
0
votes
0answers
92 views

ListLogPlot with Legends inside the plot frame

I'm trying to do ListLogPlot for the two lists of points ...
0
votes
0answers
185 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
292 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
61 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
122 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
424 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
185 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
75 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
160 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
174 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 ...