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
24 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
27 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
27 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
65 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
19 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
32 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
56 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
65 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
112 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
69 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
86 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
73 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
89 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
121 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
69 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
74 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
65 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
47 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
37 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
91 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
111 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
112 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
119 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
79 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
46 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
93 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
95 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
120 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
60 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
69 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
219 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
93 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
194 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
56 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
367 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
401 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
179 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
58 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
82 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
83 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
196 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
111 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
442 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
159 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 ...
1
vote
2answers
118 views

pslegend with dot instead of rule

I have the following MWE \documentclass[pstricks,border=0pt]{standalone} \usepackage{pst-node, pst-coil, pst-plot} \begin{document} \begin{psgraph}[axesstyle=frame,Ox=0, Dx=0.1, ...
1
vote
1answer
263 views

PGFPlots - trying to combine legends

I have an interesting problem. I am trying to create two graphs using the groupplots environment, side-by-side, that show different sets of data elements with different legend entries and different ...
5
votes
1answer
617 views

pgfplots: “group” legend entries?

Actually, I'm working on a study where I've to plot a lot of temperature data etc. Therefore, I use "pgfplots". Everything works pretty well, so that I get the result as shown in the attached picture ...
2
votes
1answer
163 views

2 rows legend and alignment

I got a legend with two rows and I would like to have a different alignment on each row. Is it possible ? In my current code, the legend entries on the second line are much longer than ones on the ...
1
vote
1answer
561 views

How to put legend below the chart?

I have the following code that produces a line chart: \begin{figure}[p] \centering \begin{tikzpicture} \begin{axis}[ use units, cycle list name=exotic, %This defines the color. It ...
3
votes
2answers
287 views

Pgfplots: let legend show two linestyles

I do have a double axis plot which which compares two different things (part 1 on the left axis in solid, part two on the right axis in dashed) for different paramters which are common for both plots. ...