Skip to main content

Questions tagged [legend]

a legend in a graph helps the reader determine the correspondence between line style and data values

3 votes
2 answers
139 views

I have a plot with several scatter plots using the same classes. I want to add a legend, but only use one class in the legend, having one entry for each \addplot. How can I achieve this? Here's an MWE....
schtandard's user avatar
  • 17.8k
4 votes
1 answer
72 views

I'm encountering unexpected behavior when using xbar interval or ybar interval plot styles with pgfplots. When I use the option draw=none, I expect no border to appear around the bars, including in ...
B Legrand's user avatar
  • 653
1 vote
1 answer
74 views

I need to avoid repetitions in the legend captions, so I want to draw two lines (red and blue) in the legend and add one signature to them $x^2$, then draw two more lines in the legend (red and blue) ...
Антон's user avatar
3 votes
1 answer
100 views

Good day. I have made a table in Excel, and am trying to convert it to LaTeX. I am struggling to add hatching to cells, and to add the visual legend. I have tried using GPT and Gemini to help, but ...
davidsmilley's user avatar
2 votes
1 answer
63 views

I am trying to plot a map of indifference curve for complements. Addlegendentry is not showing the proper colors in the legend key. How do I fix this? \begin{center} \begin{tikzpicture} \begin{axis}[ ...
aimalik's user avatar
  • 25
2 votes
1 answer
65 views

I am having a problem with the right legend colour. I have two plots showing the data for Males and one plot showing the data for Females. However, the legend for Females shows black, whereas it is ...
glitters's user avatar
1 vote
3 answers
128 views

My code is below. \documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{patterns,arrows,decorations.pathreplacing,calc,intersections,through,backgrounds,plotmarks} \usepackage{float} \begin{...
Ypbor's user avatar
  • 561
2 votes
1 answer
75 views

How do I use the variables of (nested) tikz foreach loops in the legend of a plot in math mode? This MWE fails: \documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{...
Roman's user avatar
  • 23
1 vote
1 answer
77 views

How do I change the line length of an individual entry in a pgfplots legend? I cannot use the solution provided here, as I also have other custom markers in the legend, and this screws up the vertical ...
Bart Wolleswinkel's user avatar
3 votes
1 answer
73 views

See how the red line is below the center of the caption? Is there a way to centrally vertically align the line of each item with the caption inside the legend? \documentclass[12pt]{article} \...
user3204810's user avatar
  • 1,703
1 vote
2 answers
75 views

I'm using the memoir class. Let's say I have a figure like this. \begin{figure}[htbp!] \centering \caption{Super-cool Figure} \label{fig:super_cool} \includegraphics[width = 0.7\...
simon97's user avatar
  • 11
0 votes
1 answer
51 views

\documentclass{article} % Standard package includes \usepackage{times} \usepackage{latexsym} % For proper rendering and hyphenation of words containing Latin characters (including in bib files) \...
O Y Jo's user avatar
  • 25
0 votes
2 answers
73 views

When compiling the following \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[domain=-1:1] \...
user20478285's user avatar
1 vote
2 answers
56 views

I noticed that if I use cases from package amsmath in a pgfplots legend, the legend box does not contain the whole text. See the MWE. \documentclass{standalone} \usepackage{amsmath} \usepackage{...
Manuel Du 's user avatar
0 votes
1 answer
69 views

I want to display my new results on top of a figure reproduced from an old paper. I experienced two major issues. 1.a/ If is use shifting and use \addlegendentry{My second} for a second time, nothing ...
katang's user avatar
  • 1,595

15 30 50 per page
1
2 3 4 5
31