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

learn more… | top users | synonyms

2
votes
1answer
59 views

Resize font in legend below \tiny

I have small graph in my presentation (I have to). To adjust the size of the legend, I have to use very small legend. But \tiny is not enought. Here is a MWE : \documentclass{beamer} ...
1
vote
1answer
35 views

clear me the doubt in positioning legend option

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east ] \addplot[cyan,domain=0.001:8] {abs(log10(x))}; \addplot[red!70!black,domain=-2:4] ...
4
votes
1answer
54 views

Why can't I move the legend position with PGFPlots?

I am trying to use PGFPlots to draw some graphics into my document, but I didn't manage to move the legend to the desired position. Here is the minimal code that I made: \documentclass{article} ...
1
vote
1answer
48 views

Background color of legend in graphics made with tikzpicture/pgfplots

I'm using tikzpicture and pgfplots to make graphics. And, I'm wanting a beamer presentation with black font and white writing. When I'm plotting the graph, the legend box is just a white box and I ...
3
votes
1answer
48 views

Showing legend for boxplot in pgfplots

I am trying to display a legend for a boxplot created in pgfplots. However the size of the legend is almost as large as the plot and covers up all of my plot, how do I fix this? ...
4
votes
1answer
86 views

pgfplot legend on top of grid but below graphs in axis as well as groupplot

Is there a way to specify the order of layers of elements in a pgfplots-axis? In my certain case I'd like to have the legend on top of the grid, but below the actual graphs: I know for this ...
2
votes
1answer
36 views

Adding a legend with connector to a picture with overpic and tikz lead to a misspositioning of the bottom left corner of the tikz picture box

I try desperately to make a macro which allows me to simply add a circled number with connector on a figure. To do that, I try to use into the command \put of overpic a tikz function which makes the ...
1
vote
1answer
37 views

Shared legend below a group of horizontally aligned figures in pgfplots [duplicate]

How should I run the following example code using /pgfplots/legend to name={<name>} to put a shared legend below a group of horizontally aligned figures? The example code using ...
2
votes
1answer
38 views

Legend entry not showing correct image

I don't know why the legend does not reflect the correct image for its respective entry. I want the last two entries to just show the marker and not the line (dashed line). I set the last two to just ...
4
votes
1answer
85 views

How to make a nice legend for a histogram with pgfplots

I am trying to make a histogram with the fitted curve plotted on it. Here's the mwe: \documentclass[a4paper]{scrartcl} \usepackage{tikz} \usepackage{pgfplots,pgfplotstable} ...
0
votes
0answers
36 views

matlab2tikz does not produce the legend

I am using matlab2tikz to convert a matlab figure to .tex format. However, I am experiencing some problems when I try to include a legend. I use the following matlab code hor=1:30; x=hor.^3; ...
3
votes
2answers
46 views

latex - colorbox in caption as legend - how to center or alternative solution?

I have an image of a diagramm that I want to use as a source in my work. I have no possibility to create this diagram. So, I want to add colorboxes in the caption as a legend. here is my actual code. ...
3
votes
1answer
63 views

Changing arrow style between graph and legend

I want to have the arrows on the ends of the graph but have the legend just show straight lines (without arrows). MWE: \documentclass[12pt]{article} \usepackage{amsmath, amssymb} ...
1
vote
1answer
76 views

multi-Figure with pgfplots with one legend and rotation

I would like to have in a page two figures like the one the code below at the same page using subcaption and sidewaysfigure. The first problem is that probably there is a mistake at the position of ...
4
votes
1answer
156 views

Vertical spacing and item separation between entries in pgfplots' legend

One could find a lot of questions on how to change the horizontal spacing between legend entries in pgfplots, but I can't find anything on the vertical spacing between the entries. For example, when ...
2
votes
0answers
85 views

Legend entry for each point in scatter plot with matching color

I have a file with multiple columns, of which I create scatter plots where positions are given from column 1 vs column 2, while the mark color is based on column 3. I now wish to automatically create ...
6
votes
0answers
95 views

Add break node to plot in pgfplots

I was able to 'break' the vertical axis using pgfplots, but some issues came along with it: Most importantly, I can't find how to add the 'break sign' (the two parallel lines) to my plot as well, ...
6
votes
1answer
82 views

Custom area legend image not working

I'm trying to use the result from a fill between as a legend entry, but I can't get it to work: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} ...
2
votes
1answer
92 views

Am I properly inserting legends in groupplots? Labels “multiply defined”

I have a few places in my document where I use groupplot to insert several figures, but I only want one legend as it's common to them all. I've done this using legend to name=foo and then, after the ...
5
votes
2answers
173 views

Setting all nodes to use \sffamily without overriding font size

In my document, I want all labels in tikz and pgfplots graphics to use sans-serif, so I use \tikzset{every node/.append style={font=\sffamily}}. This works. However, when I use this, inside my axis ...
2
votes
1answer
89 views

Bar Chart Patterns in Legend

I have a groupplot with three bar charts using a common legend. This worked great when I was using color, but now I have to prep for publication in black and white. I'm not well versed at all in ...
1
vote
2answers
89 views

Different space between nodes for Tikz legend

I want to add a legend to my graph, explaining what different arrows mean. I thought I might be able to do it using coordinates, but the spaces between them are the same as spaces between the nodes ...
2
votes
0answers
89 views

Legend image arguments for the command `\addlegendimage`, 3d legend image

In the 3d plot I want to modify the third legend entry to only show the marks and not the line. From http://tex.stackexchange.com/a/113765/28093 I understood that I'm supposed to use something ...
1
vote
0answers
52 views

Selectively add legend entries to plot on large CSV

I have a plot with 63 lines, only some of which I would like legend entries for. The full legend takes up half a page, and using the \ref method does not give me consistency with the surrounding ...
1
vote
0answers
42 views

Add one legend to several subcaptionfigures

I have the following problem: I have several pgf plots in one figure (see screenshot). I make it with \subcaptionbox. Now i want to add one legend for all 6 plots, since in all plots the same signals ...
3
votes
1answer
98 views

How to add one single legend entry for several plots?

How can I create a single legend entry for 4 plots at the bottom of the group of plots?. Something like this: Title Title -------------- ---------------- - ...
3
votes
1answer
127 views

How to draw a bubble column chart with a legend?

I am very new to plot in Latex, and am trying to piece together a bubble column chart with a legend and labelled axes. So far, I have a working chart, but can only get the legend or a labeled x-axis. ...
1
vote
1answer
166 views

PGFplots axis legend with multiple columns/rows of different lengths

I have an axis environment in PGFplots with multiple graphs which correspond to certain group of data types. I want to stress this distinction by grouping the legend entries. In particular, using a ...
4
votes
1answer
124 views

Generating pgfplots legend from gnuplot data

I’m having trouble getting pgfplots to typeset very small numbers, e.g. 6.82e-08. I don’t know if the problem lies in it being a very small number, or if it’s because of the interaction with reading ...
2
votes
2answers
101 views

How to make a legend entry image consist of line, pattern and markers in pgfplots

I'm trying to make the legend entry image look like a chunk from the "whole" of the following plot (so it has a line, pattern lines and marker). Is it really possible? I'm after an unsuccessful ...
3
votes
1answer
52 views

Align legend label to text

I have this MWE. \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{patterns} \definecolor{nrgray}{HTML}{F0F0F0} \newcommand{\graphTripleData}[4]{ \begin{tikzpicture} \begin{axis}[ ...
2
votes
1answer
105 views

Problem with legend on a 2 y-axis line & ybar figure

I cannot seem to figure out a way to switch the legend symbol to the ybar symbol in a two y-axis plot. Here is a minimal working example of my problem Which yields this: So the only problem with ...
2
votes
1answer
100 views

Pgfplots: Placing legends individually to the end of lines

I have a few days of experience with LaTeX. It seems almost everything is possible if you just find out how. So, here is a challenge... If a plot has many lines it is much more readable to have ...
3
votes
0answers
137 views

Automatically positioning a legend relative to multiple plots in groupplots

This question deals with centered legend placement in a set of plots aligned with groupplots. However, as the OP stated in a comment, the (accepted) solution requires some hand tweaking. I suspect ...
1
vote
1answer
69 views

How to make a custom legend with a squared box followed by a text?

I'm trying to make one of that legends that we can find in some graphics such as bar plots. Just to clarify, I'm not displaying a plot. I have to present a schedule, which is defined trough a ...
3
votes
1answer
83 views

Display mark instead of line in tikz legend

When using \addplot[color=black, mark=o, draw=none] table [y=Y, x=X]{Data/bottoms.dat}; \addlegendimage{New record}; \addplot[color=black, mark=x, draw=none] table [y=Y, ...
0
votes
0answers
232 views

Matlab2Tikz legend changes position

I have a matlab output figure with subplots where the legend is just at the right spot (fig. 1). I used legend({'Country 1','Country 2'},'Orientation','horizontal','Position', [0.25 0.95 0.5 0.05]); ...
4
votes
1answer
113 views

pgfplots: Dual axis

I want to display a dual axis as pictured in Fig.1. But When i write the file .Tex I obtained a different presentation. I want also to display all the numbers between 1-12 in the x-axis. Any help ...
3
votes
1answer
230 views

pgfplots : Row title in legend

I would like to add a title to each row of my legend in pgfplots. I achieved this with this example : \documentclass{article} \usepackage[pdftex, active, floats, tightpage]{preview} ...
3
votes
1answer
58 views

Providing legend for pre-rasterized data

I have a plot containing several million data points (real-time sensor, 50 samples/s, multiple channels, 5 hours). To keep the file size of my document down, I made a bare PNG with the line graph in ...
2
votes
1answer
416 views

How to adjust the legend line length in pgfplots

I have a plot using pgfplots but I need to adjust the length of each legend. I can modify the width of each legend line, but I don't know how to modify the length of them. Is there any option to ...
2
votes
1answer
454 views

Add legend to pgf plot results in \end{axis} error

I exported a Matlab figure to tikz, using matlab2tikz. It is a simple plot of some lines and I need to label them. matlab2tikz did not add the legend entries automatically for the first time, so I ...
2
votes
1answer
192 views

pgfplots legend nested in matrix

I'm using a \matrix to arrange subplots, each created using pgfplots. When I tried to use \legend to add a legend to individual plots, lualatex tells me Package pgf Error: You cannot nest ...
0
votes
1answer
62 views

table legend - wrong reference

I'm using these commands to create a table with a legend, but the problem is that when I make a reference to it, it appears as "Table IIIB" instead of "Table III". Can you help me please ? ...
1
vote
1answer
98 views

How to have a color square in a text caption

Just like the figure on the right hand. The small squares in green color.
0
votes
0answers
85 views

I have 3 data series and 2 different y-axis. How can I add, outside the graph, the legend for each of three series?

Does someone know how can i change the position of my legend to right-side of my graph? I try many things but i can't. Please give me some help! Here is my code! \resizebox{\textwidth}{!}{ ...
3
votes
3answers
203 views

Tikz-Create a Picture Legend

I am trying to create a legend inside a tikzpicture. The picture shows an accelerator and I would like to make a legend that will explain each part. My code is \documentclass{standalone} ...
2
votes
1answer
120 views

How can I place a node relative to a legend?

I'd like to place custom formatted nodes relative to the legend in a plot. The answer to Placing node relative to legend is a solution per se, but related to op's actual intent so it isn't helpful to ...
1
vote
0answers
494 views

Cannot align legend's text in plots using tikzpicture package

I'm trying to align the text (text + $math$) within the legend in my pgfplot. Despite I put the "legend cell align=left", the text still is centred. Any guess? \documentclass[]{article} ...
6
votes
1answer
163 views

plot legend : increase its area

So my question in general is what is the method to change the precise area of the rectangle used in pgf plots? Yes, to make it larger ... MWE: a typical bar chart ...