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

learn more… | top users | synonyms

1
vote
0answers
29 views

Legend next to each slice - pie graph

I already made a similar question but didn't explain my self well - Align 3 graph pies I want to have something like this: And here is the code how I constructed each pie: \def\stackalignment{r} ...
0
votes
1answer
18 views

Inserting multiple legends in a pgfplot with one \addplot graphics

I would like to have the legends match the line plots from the diagram. I have referred to a lot of legend questions, but I couldn't find one where they were trying to make multiple legends for a ...
3
votes
1answer
32 views

Independent control of node fontsize in pgfplot

I am making several figures in my paper using pgfplot. I want to independently change the fontsize of tick labels, axis labels, legend and some other notes/labels in the figure. Say, 8 pt for axis ...
2
votes
1answer
41 views

fill between in pgfplots changes legend font [duplicate]

I am working on a document in which several plots are placed alongside each other. Some of them use "fill between" and some of them don't. The problem now is that depending on whether this is used or ...
1
vote
1answer
44 views

Tikz plot set legend entries manually

I have a plot in which I have only one actual plot line and two things I draw into the plot area. A horizontal line and a circle which I want both to appear in the legend. I tried using the \...
1
vote
1answer
43 views

Center legend above (or below) a groupplot WITHOUT references

So, I need to place my legend outside a groupplot with 2 columns and 2 rows. I'd like to center it either above or below. I read a lot of similar question on tex@stackexchange, but all of them seems ...
2
votes
1answer
43 views

Tikz pictures disappears when adding legend

\begin{center} \begin{tikzpicture}[>=stealth,trim axis left, trim axis right] \begin{axis}[legend style={at={(axis cs:40,20)},anchor=south west, draw=none}, xmin=0,xmax=4, ymin=0,ymax=2, ...
1
vote
0answers
30 views

Colorbrewer with legend outside graph and which Colorbrewer?

I am using Colorbrewer with PGFplots and I want the legend to be outside of the graph. The LaTeX environment is Texlive 2014. Here is a MWE: \documentclass{article} \usepackage{pgfplots} \...
4
votes
1answer
41 views

PGFplots: decorating plot but not legend

Using PGFplots, I would like to apply a decoration to a plot but not to the corresponding legend entry. Is there a way to do this? Here is an example: I'd like the legend image to be just the line, ...
2
votes
1answer
53 views

Use single plot marker in manual “group” legend entries

I have an axis which contains several plots. These plots can be divided into two groups, of which each has a common plot marker. The plots are styled using a combined cycle list. I would then like ...
0
votes
0answers
15 views

bringing legend in next line

how do i bring the legend in the next line. I am facing a problem with very long legend strings. How can bring some string in the next line. Ex:- plot "datafile" using 1:4 with linespoints lw 3 pt 6 ...
2
votes
0answers
15 views

skip a plot in the legend entry legend [duplicate]

I'd like to legend only certain curves but \addlegendentry add an entry for each curve, in sequence. \documentclass{article} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture} \begin{...
1
vote
2answers
98 views

How can I set a legend outside subfigures?

I'm making a figure with three subfigures inside of it. I'd then like to create a legend on the top left of the figure. Currently I've created the legend in the third subfigure but it would be ideal ...
5
votes
1answer
87 views

Color cycle and forget plot

I use cycle list name=exotic as coloring for my plots. I am looking for a way, either to use a number referring to a color (index from the exotic list), or a way to get the color of a labelled plot. ...
3
votes
2answers
50 views

pgfplot bar graph legend and y labeling

I would like to ask how to get my results. My code: \begin{tikzpicture} \begin{axis}[ybar stacked, legend style={cells={anchor=west},at={(1.75,0.89)}}, area legend, %legend style={at={(1,-1)...
2
votes
1answer
57 views

how to set and position legend in a plot with pgfplots?

I want to put a legend in this two plot: i have this code: \begin{figure}[!ht] \resizebox{\textwidth}{!}{ \begin{tikzpicture} \begin{axis}[xmin=0, xmax=90,axis y line*=left,ymin=8.62,ymax=8.69, ...
0
votes
1answer
58 views

PGFPLOT bar graph possition legend and different notation

I would like to ask you about the bar graph and possition legend. \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} [ xbar, %enlargelimits=0.14,...
1
vote
1answer
200 views

Fill square mark in legend?

I'm using the following code to generate a simple graph, and I want to have the legend show a filled in gray square to represent the shaded area on the graph. Everything still leads to a white square ...
1
vote
0answers
43 views

Position of text on graph using matlab2tikz (underflow issue)

The matlab pcakage matlab2tikz converts plots automatically to Tikz files, which can be later called in the main Tex document very easily. Here's my problem: the piece of tikz below draws a circle ...
2
votes
0answers
47 views

PGFPlots - Legend box aligning with axis [duplicate]

I am trying to increase the size of the legend such that it exactly fits to size of the plot. But even after having a look at the PGF manual I could not figure out how I can realise my plan. ...
4
votes
1answer
66 views

justify legend enteries in pgfplots

I wanted to know how I can go about left aligning the legend enteries in my pgfplot. This is the effect I would like to have: Here is my code: \documentclass[tikz]{standalone} \usepackage{...
5
votes
1answer
92 views

Move position of y-axis label and legend in pgfplots

I would like to move one of the y-labels to the second group of plots on the right and legend more to the center of the plots as shown here: Here is the code: \documentclass[11pt]{book} \...
3
votes
1answer
151 views

pgfplots legend with two ordinates (lines and bar chart)

In the legend, I would like to have a line for the red and orange lines (as it is the case), and ybar legend style for the rest. I just can't figure out the easiest/best/any way to do it. MWE: \...
1
vote
0answers
56 views

Adding vspace between x-axis label and legend generated with legend to name feature [closed]

I recently started working with pgfplots and now I am trying to generate two horizontally aligned plots using the same data. So I wanted to use one single, centered legend for both plots. It is all ...
1
vote
0answers
40 views

The location of figure in PNAS template mess up caption and legend

I am modifying this PNAS template (http://www.latextemplates.com/template/pnas) for my journal. I have been puzzled by the position of figure and its effects on caption position and legend indentation ...
2
votes
1answer
45 views

Remove marker from legend in pgfplot

In my code below, there is a marker in the legend. I just have two plots without any markers. How to remove these markers and just have the line be shown in the legend entry? Here is my code: \...
1
vote
1answer
207 views

change color of line in legend image (tikz pgfplot)

I want to change the color of the line in the legend image, because the line color in my plot is different to the mark color. \begin{figure}[h!] \begin{tikzpicture} \begin{axis}[legend pos=south east,...
3
votes
1answer
146 views

More visible legend entries for only filled pgfplots bar chart

How can I get more visible legend images next to the textual legend entries A, B, C? The default for only filled bar charts seems to consist only of a hair thin vertical line, which makes it quite ...
1
vote
0answers
62 views

pgfplot - keep legends widthin \linewidth when the are set outside

I'm using pgfplots, but i want to have my legends next to the plot. This is easy by setting legend style and anchor. But i also want the plot to be as big as possible. So if my labels are to long, ...
4
votes
1answer
788 views

Multi-line legend entry in pgfplots

In some of my plots the curve description in the legend is too long, making the legend going over the plot, even if the legend is placed as far away as possible. Therefore I want to have multiple ...
3
votes
1answer
70 views

Pgfplot Legend Type

I need a legend type given below. I want to write parameter values just once. How can i get this type legend. code example \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} ...
1
vote
1answer
47 views

Using the tikzexternal.sty package together with legend to name feature

I am using the following TeX code (minimal example), which compiles fine, when running pdflatex then run make -f filename.makefile and repeat the procedure a second time to also include the referenced ...
5
votes
1answer
135 views

Move common legend to top right of plots in pgfplots

in my code below, I wanted some help to move my common legend to the top right of the plots like this: Can you assist me with this? Thanks. Here is my code: \documentclass[11pt]{book} \...
0
votes
1answer
32 views

Common Legend in pgfplot - having problems compiling

I am trying to get a common legend for the six plots that I have. I tried to implement the code found here, but could not get my program to compile. I tried to get the legend at the bottom of the ...
1
vote
1answer
169 views

PGFPlot : Relative positioning of legend according to axis

I am trying to move the legend of a PGFPlot above the top right corner, but using relative positioning like at={(current axis.above of north east)} in stead of manually giving a position like at={(1, ...
4
votes
1answer
273 views

tikz legend in caption and colorbrewer

Related to the question tikz legend in caption I want to use the colorbrewer library (just unzip the archive in the working directory). However, it seems that they cannot be used together. \...
1
vote
1answer
241 views

Change mark size in legend entry

I want the marks in the legend to be bigger than in the plot. But I'm facing the problem that if I use mark options in legend style, then I can't use it again in addplot. At the moment I get the ...
4
votes
1answer
578 views

Pgfplots legend style marker size

I have the following plot: \begin{tikzpicture} \begin{axis}[ xlabel={\tiny X}, ylabel={\tiny Y}, xmin=0, xmax=5, ymin=0, ymax=18, minor x tick num=4, minor y tick num=4, ytick={0, 2, ...
3
votes
1answer
81 views

Show line to the right of text in plot

By default, tikz shows the text in a legend to the right of the line as shown in the picture below. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{...
6
votes
3answers
211 views

How to reposition the legend?

Right now, it looks like this: I don't like that the box intersects the function graph. How could you reposition it? And I cannot see the label for the y-axis. Where has it gone? Could you also ...
2
votes
1answer
53 views

How to put a Legend under a figure?

In my document I got a figure with a lot of symbols in it like this: I want to add a legend to it, explaining all the symbols used. How do I achieve this? \begin{figure} \centering \includegraphics[...
5
votes
1answer
127 views

Split line in `legend` with `pgfplots`

In the following plot, how can I split the red line of the caption into a red line and a blue dashed line (so that the total length of the red-blue segment is that of the green one)? MWE: \...
3
votes
1answer
105 views

pgfplots legend disappearing with externalization

I have an issue with a combination of a special legend I am doing in a pgfplot, and with using tikz externalization. See the MWE below. The legend will not appear if I use externalization, but if I ...
8
votes
1answer
444 views

How to increase legend lines lengths in PGFplots

I want to know how I can make PGFplots to draw longer segments in the legend. I looked at couple of previously asked questions and none seemed to work for me. In this question: "adjust the legend ...
0
votes
1answer
338 views

How to only show legend in pgf plot?

I have created with matlab2tikz a standalone picture, saved in myfile.tikz Here is the code: % This file was created by matlab2tikz v0.5.0 running on MATLAB 8.4. %Copyright (c) 2008--2014, Nico ...
2
votes
0answers
23 views

Colorbar for lineplot using pgfplots [duplicate]

I am doing a lineplot with pgfplots. However, instead of the usual legend, I would prefer a colorbar, as I am basically trying to visualize a transition, and for that I chose colors in a gradient like ...
3
votes
1answer
2k 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} \usepackage{...
1
vote
1answer
49 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] {2+exp(abs(x))};...
4
votes
1answer
2k 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
276 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 ...