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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
48 views

Alligning Labels and Extending Axes

How to plot the following graph? How to remove the dot in the left down corner (at 9.9)? How to align A, B, C, D and the corresponding numbers? How to hide 0, 1, 2, .....10 on the vertical axis? The ...
user avatar
3 votes
1 answer
131 views

Plot with embedded legend and white space

It would be nice to be able to include a legend in a plot which has grid lines, but not have the grid lines included in the legend box. Here is an example with the legend containing those grid lines: ...
user avatar
  • 1,887
5 votes
1 answer
62 views

BarLegend with comma as NumberPoint

I'm having trouble in plotting a Barlegend with comma as decimal separator in Wolfram Mathematica 13.0. I already tried to change the environment variables or to use ...
user avatar
9 votes
1 answer
183 views

How can I add different ticks on both sides of color bar?

...
user avatar
4 votes
0 answers
34 views

Unable to change LabelStyle in LineLegend using SetOptions

I am setting the "Times New Roman" font family for the label style in the LineLegend function in the following way, which doesn't work. ...
user avatar
  • 419
2 votes
1 answer
137 views

A question related to the usage of LegendLayout -> {"Row", 1}

I saw this piece of code from an answer by @Syed here. ...
user avatar
  • 2,147
5 votes
1 answer
66 views

Stacking lines of text in a LineLegend?

I have the following LineLegend: ...
user avatar
3 votes
2 answers
125 views

How to change layout of a legend in Show function?

I am trying to combine two plots using the Show function and have the resulting legend appear as a row. Using the LegendLayout function for each individual plot is not working. Below is my code: ...
user avatar
4 votes
1 answer
64 views

Making a Plot legend containing both markers and lines?

I am trying to make a legend comprised of both the plot's marker symbol and a line. Specifically, I am hoping to have a legend that looks like the line is crossing through the marker. My current code ...
user avatar
0 votes
1 answer
46 views

How to plot a set-valued mapping graph

I know that if $T$ is a single-valued mapping for example $T(x)=x^{2}$ for all $x\in[0,1]$ then its graph can be plot using Plot[x^2, {x, 0, 1}] Is there any way ...
user avatar
  • 169
2 votes
2 answers
74 views

Plot issue : put a legend instead of a top label

I have an issue about putting a legend consisted of a text and numerical value instead of a label. For example, with this command line : ...
user avatar
  • 35
1 vote
1 answer
53 views

Plot issue : bad label ordering with concatenation of strings

I have an issue about a label which is consisted of a variable name [Omega]BD and a numerical value associated. Firstly, I put the BD subscript to ...
user avatar
  • 35
0 votes
1 answer
32 views

Line Legend with dashes and thickness not working

I am trying to create a line legend with specific dashing and thickness. Here is the code. ...
user avatar
1 vote
2 answers
64 views

Place legend inside the plot

I am trying to place my plot legend inside the graph. Currently it sits outside the plot and gets covered up when I place another plot next to it. This is the code I am using. ...
user avatar
4 votes
1 answer
68 views

BarLegend tick labels broken with MaTeX

There appears to be an issue with using MaTeX text on the ticks of a BarLabel. Without MaTex,...
user avatar
1 vote
2 answers
67 views

Plot a solution of a differential equation

Consider a BVP $x^{\prime\prime}(t)+x^{\prime2}(t)-x(t)\left(x^{2}(t)-\frac{3}{2}x(t)+\frac{1}{2}\right)=0,$. The Boundary conditions are $x(0)=1$ and $x(1)=2$. It follows that the exact solution is $...
user avatar
  • 169
1 vote
1 answer
54 views

PlotMarkers in Mathematica with using an iteration scheme

I have the following operator $T:[0,1]\rightarrow[0,1]$ by $Tx=\frac{x}{2}$. I use the following method for two different initial point $x_{0}\in[0,1]$ as $x_{n+1}=Tx_{n}$ $n=0,1,2,3,...$ I have set ...
user avatar
  • 169
1 vote
0 answers
57 views

StreamDensityPlot: Two legends instead of one [closed]

Bug found in Mathematica v12.0.0.0-MacOs 12.3-Monterey and fixed as late as v12.2.0-Win7-x64 In Mathematica v12.0.0.0 I used the following code to create a stream-density plot. ''' ...
user avatar
  • 11
7 votes
2 answers
186 views

How to show distance between two horizontal lines in a graph

I want to plot a like this So far, I am able to plot it like this ** However, I am unable to add that \[Sigma] symbol between those two dashed lines. How do I do ...
user avatar
  • 279
4 votes
1 answer
113 views

Making Justify (Perfect) alignment in the PlotLegend

I am trying to plot some datasets ({L1, L2, L3, L4, L5, L6, L7, L8, L9, atmve, atmvebar, atmvmu, atmvmubar, DSNve, DSNvebar, DSNvx}) using ListLogLogPlot. For that I have written this following code-: ...
user avatar
3 votes
2 answers
154 views

Half dotted half solid line in Epilog LineLegend

I have a plot in which a function is plotted as dotted line in some domain and solid in another, like this: ...
user avatar
0 votes
0 answers
35 views

How to remove small ticks and add frame around legend inside of the plot?

I created plot (attached image). I need to remove the small ticks, just having integer number (removing 0.5,1.5,2.5) and putting frame around legend at end need to replace word (Orange, Blue,...) with ...
user avatar
  • 383
3 votes
1 answer
72 views

BarLegend tick labels

I am doing a ListContourPlot of my data, but to achieve a solid plot I needed to first take a logarithm of the "height". Now I'd like to force the ticks on my BarLegend to certain values, ...
user avatar
3 votes
1 answer
65 views

Changing the line width in the Legends

I have changed the width of the plots in my code but whenever I save it as a pdf file, it appears that the legend specifying each plot has a thin width as compared to the lines in the plot. Following ...
user avatar
  • 65
0 votes
0 answers
15 views

How to add Barlegend in DensityHistogram as z axis?

I have data in the form of x={1,3,5,6,2,4,6,4.5,2.5,2.1,5.7}; y={3,6,2,1,8,4,3,9,11,16,9}; z={0.000001,0.0004,0.000012,0.000005,0.000002,0.000003,0.0010008,0.000009,0.000007,0.005,0.000009}; Data={1, ...
user avatar
1 vote
1 answer
57 views

Listplot legend in one column

I am trying to plot multiple curves with ListPlot. Since I have 12 curves to plot, the legend appears in two columns. I looked into this solution but it does not work with Listplot. Can anyone help? ...
user avatar
  • 37
2 votes
1 answer
106 views

Color bar depending on a parameter

I'm trying to reproduce a figure like the following: I had the analytical expression for each curve, and the color bar indicates the value of some parameter. My problem is that I don't figure out how ...
user avatar
2 votes
1 answer
108 views

User defined placement of Legend in 3D graphics

I am trying to position the legend in a 3D graphics using PlotLegend[Placed... If I do this, I am not able to rotate the 3D graphics. The default legend location is a little too far from the graphics ...
user avatar
1 vote
1 answer
49 views

How to add Barlegend in ListPlot as z axis?

I have data in the form of x={1,3,5,6,2,4,6,4.5,2.5,2.1,5.7}; y={3,6,2,1,8,4,3,9,11,16,9}; z={0.001,0.004,0.012,0.005,0.002,0.003,0.018,0.09,0.007,0.005,0.009}; Data={1, 3, 0.001}, {3, 6, 0.004}, {5, ...
user avatar
1 vote
1 answer
48 views

A question about the Iconize command and the Graphics Options

I have the following function: f[t_, s_] := Piecewise[{{{-Sqrt[2 s + t^2], Sqrt[2 s + t^2]}, s > 0}, {{-Sqrt[2 s + t^2], Sqrt[2 s + t^2]}, s > 0}}] The ...
user avatar
0 votes
1 answer
45 views

How to change the colors of legends markers in the given code?

I am using this code ...
user avatar
  • 463
3 votes
1 answer
104 views

Use y-values as PlotMarkers

Is there an automatic function inserts y-values as PlotMarkers? For instance, suppose I wish these four points in ListPlot to display as their values (2, 4, 6, and, 8 respectively): ...
user avatar
  • 3,446
0 votes
1 answer
45 views

Labelling Individual Functions in a Table of Plots

How do I label individual functions in a plot that contains 25 functions in a list? Where do I put the range for the iteration variable "i" in the String Form of the Callout of the ...
user avatar
4 votes
2 answers
218 views

Modify the range of the color function in a StreamPlot, and add the corresponding ColorBar in the legend

Hello I'm trying to manually clip the scale of the colors for the streamlines in StreamPlot. The problem is that at the origin the velocity goes to infinity and that throws off any attempt to ...
user avatar
5 votes
1 answer
166 views

How to control color bar min and max in StreamPlot

I have the following code ...
user avatar
  • 635
0 votes
1 answer
60 views

How to edit 3D plots to include labels?

In this simple example, I want something like as shown in the figure (which I did in paint) where $\sin(xy)$ and $\cos(xy)$ are shown on surfaces rather than separately as legends. ...
user avatar
  • 295
4 votes
4 answers
141 views

Error when placing legends

Consider the following plot plot = ListLinePlot[{{{0, 0}, {1, 1}}, {{0, 0}, {1, .8}}}, PlotLegends -> Placed[{"1", "2"}, {.8, .4}]] When I ...
user avatar
  • 4,138
1 vote
0 answers
40 views

How to label a contour in ContourPlot with arbitrary text

I want to put a label on a contour in the ContourPlot with a text, but I can not do it. I have read all questions about this issue in the slack, but I could not find an answer to it. Let say, I want ...
user avatar
  • 99
1 vote
1 answer
60 views

How to create a flexible BarChart[ ] with Manipulate[ ]

This question is nothing more than making a few changes to an already working code. I put that code into Manipulate[...] to be able to choose a subset of countries ...
user avatar
  • 4,391
2 votes
3 answers
226 views

How can I scale color bar and make it consistent with color of plot

for a minimal example, I have these two sets of data ...
user avatar
1 vote
2 answers
58 views

Customizing bar in MatrixPlot

I'm triying to plot the following matrix: ...
user avatar
7 votes
1 answer
140 views

How can I add legends in the ClusteringComponents function?

I am trying to do color separation on this image using ClusteringComponents function (following an example on Wolfram Mathematica webpage). I will like to have a legend identifying each segmented ...
user avatar
  • 595
1 vote
0 answers
51 views

BarLegend with Non-linear Scale

And wouldn't you know it... I found this in the "Linked" section. BarLegend with a log scaling HOWEVER, it still doesn't work with a ColorDataFunction, i.e... ...
user avatar
  • 271
7 votes
3 answers
264 views

How to present a Barchart and a Table in a single figure

Using the following code, ...
user avatar
  • 4,391
2 votes
1 answer
84 views

BarLegend frameticks formatting

I'm trying to change the default BarLegend ticks style using the officially documented methods, but nothing changes. I've tried the Method method (...
user avatar
0 votes
1 answer
47 views

Positioning a BarLegend on ContourPlot [closed]

How can I change the position of the legend of counter plot? LegendPosition does not work in this case! how can I do this for the following example? ...
user avatar
2 votes
1 answer
36 views

Label of plotting elements of matrix [closed]

I have a little quest. I have a matrix which elements are functions of two variables: matrix[x_,y_]={{Sin[x y],Cos[x+y]},{Sin[x],Cos[y]}} Then I want a 3-...
user avatar
2 votes
1 answer
58 views

Problem with using PlotLabels or PlotLegends as an option for Show[] [duplicate]

As mentioned in the documentation for Show[]: Show allows any option that can be applied to graphics to be given. I have the following code: ...
user avatar
  • 340
0 votes
0 answers
48 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 ...
user avatar
2 votes
2 answers
150 views

There is a way to put a legend into a graphics?

There is a way to put a legend into a graphics? For example, given the Graphics ...
user avatar

1
2 3 4 5
16