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.

36 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
133 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
85 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
29 views

Multiple legends for barCharts

I came across this and found it quite cool. Here is the minimal example: ...
3
votes
0answers
352 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
375 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
25 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
136 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
96 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
369 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
57 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 ...
1
vote
0answers
27 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
21 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
53 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
60 views
1
vote
0answers
79 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
58 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
34 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
41 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
52 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
37 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
61 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
88 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
55 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
38 views

Outline Color in RegionPlot & Labeling

I would like to: change the outline color to be black, for both regions, rather than the current blue and orange. Is this possible? I would like to label the white area above the b2 = 3.1 line as &...
0
votes
0answers
45 views

Force persistent Tooltip positionning inconsistencies

Context Following this post, and inspired by that one, I am trying to make a plot more readable using the analogue of persistent Tooltips via ...
0
votes
0answers
55 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
75 views

ListLogPlot with Legends inside the plot frame

I'm trying to do ListLogPlot for the two lists of points ...
0
votes
0answers
94 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
158 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
60 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
114 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
314 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
150 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
63 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
145 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
122 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 ...