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

learn more… | top users | synonyms

6
votes
1answer
390 views

How to fill the mark in pgfplot legend

I would like to create a graph using pgfplots. I don't like the legend symbol used for ybars and decided to go with a line legend entry and squares instead. How can I fill these marks, so that they ...
5
votes
0answers
230 views

legend problem in highlighting a data plot

I followed the tips on highlighting in data plots at http://www.howtotex.com/tips-tricks/highlighting-in-tikz-plots/ The highlighting does not work well with \addlegendentry. A MWE is shown below. ...
2
votes
1answer
206 views

Pgf plots and a tabular legend

I have a plot where I want to add a legend which is the combination of lines and marks. For that I want to replace (or define a new) the original pgf plots legend type. As said before, in the ...
4
votes
1answer
155 views

Legend on second frame has only one entry, labeled wrong

Using pgfplots in beamer with \only frames, the legend for the second frame (only) inexplicably shows only one entry, with the color of the last \addlegendentry, but the legend of the first. The other ...
8
votes
1answer
448 views

dashed line in pgfplots legend results in incomplete marks

When defining the pgfplots legend entries myself, I have a problem when using dashed lines in combination with marks. The mark is also dashed (or dotted, etc.), just as the accompanying line is. Is ...
3
votes
1answer
513 views

Modify the legend-style in pgfplots

I have a question concerning pgfplots. I made a minimal example which is related to the example in the pgfplots manual (page 182): \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
8
votes
1answer
265 views

legend placement with bounding box restrictions and externalization in pgfplots

I find it useful to add \pgfplotsset{/tikz/every picture/.append style={trim axis left,trim axis right}} to my preamble for bounding box restrictions. But then when I use the legend to name feature ...
8
votes
1answer
198 views

pgfplots: problem in the legend using custom marks

With the help of \pgfdeclareplotmark I defined a custom mark for a plot and it worked as expected; however, in the legend, the mark appears with a vertical shift. What is causing this problem and how ...
5
votes
1answer
149 views

Legend position in standalone pgfplot moves when plot is used in document

The following mwe shows that the legend position in a pgfplot changes when the standalone version is scaled in a document that includes it. Standalone: From driver: (I changed the sizes to ...
8
votes
1answer
216 views

Split tikz tree level in two parts

I would like to rebuild this graphic for my bachelorthesis. The problem that i ran into was, that i don't know how to split the graph in the second level, like shown in the picture above. I was ...
2
votes
1answer
74 views

StrSubstitute not working nicely with pgfplots

This question is related to my older question here, but now slightly different. I now have a function that is supposed to take two multivalued arguments. One contains the columns i want to plot. If i ...
1
vote
1answer
160 views

Legend entry with curve fits

I am plotting two data sets with curve fits added manually (by defining two functions). How can I edit my legend entry to combine the data points and lines into one icon? So instead of having four ...
4
votes
1answer
317 views

Missing mark at legend for tikz bar chart

I have the following code: \begin{tikzpicture} \pgfplotstableread{ % Read the data into a table macro Label First Second Third test 30 30 40 }\datatable \begin{axis}[ xbar ...
6
votes
1answer
3k views

pgfplots scale legend position when below xlabel

When using matlab2tikz to generate a .tikz from Matlab where the legend location is set to 'SouthOutside' (below the ylabel of figure), the position of the legend will cover the ylabel unless the ...
5
votes
1answer
780 views

New line in pgfplots/tikz not displaying in TeX

I have a multiple-line legend entry to preserve the width of my figure. I can use \newline in Matlab and the legend entry is split between two lines. When I produce a .tikz of the figure however, I ...
9
votes
2answers
481 views

How to add legend to contour plots?

The following does not work: \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[view={0}{90},legend entries={foo,bar}] % 'legend entries' causes ...
7
votes
2answers
2k views

How to modify the image of an legend entry

I have the following code \documentclass[tikz,convert={size=640}]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ legend entries={simulation sample 1, ...
2
votes
1answer
334 views

pgfplots: Scatter plot with multiple series side-by-side

I have multiple machines on which I did benchmarks. Now I wan to use pgfplots to show multiple y values (the variance in the measurement) for a single x value (a benchmark parameter) within a single ...
2
votes
1answer
200 views

How can I add or overlay a legend to an .eps image

Assume someone has several Matlab plots saved as .eps graphics and realizes in some of them the legend for the curves is missing. Is there a way to add these legends afterwards, or to overlay another ...
5
votes
1answer
871 views

Global legend for multiple figures

Similar to this question, I need output as follows but in a neat way. My solution code is not neat any more: I added a dummy axis to use its legend. Also the legend must be at top of the page. Here ...
1
vote
1answer
115 views

Legend of picture, caption

I would like to assign one caption to a picture in my report, without this caption begin in the listing of figure. I use the following: \begin{figure}[htbp] \begin{minipage}[l]{.645\linewidth} ...
4
votes
3answers
475 views

Spider Graph Legend and Caption

I would like to add: legend (Red, blue and Green) and figure caption (with legend) for my Keviat plot. The code of my keviat is listed below. Thank you \documentclass[]{scrartcl} ...
4
votes
1answer
302 views

line legend for mesh plots

I am doing a group plot of related curves. Since they are related by a parameter, I want to color them according to (a function of) that parameter. For that purpose, I used the mesh option, and then ...
4
votes
1answer
650 views

How to draw horizontal(row) legend without the surronding rectangle?

I found the following code to manually draw legend, but it produces vertical(column) legend. How to draw it horizontally? I don't want surrounding rectangle also. \documentclass{article} ...
4
votes
1answer
529 views

How to manually draw horizontal legend and place it correctly in tikz?

This is my tikz code to draw some plots. \documentclass{article} \usepackage{tikz,subfig} \begin{document} \begin{figure} \centering \subfloat[Iteration Domain for a Tile]{ ...
2
votes
1answer
233 views

How to generate a separate legend picture?

I want to generate a tikzpicture which only contains the legends, and not the plots themselves. I use the following code and it returns an error: ! Package pgfplots Error: Sorry, the supplied plot ...
5
votes
1answer
763 views

Legend position & bad x ticks scale

I'm currently experimenting tikz-pgf, but facing some strong behaviour. How is it possible to have only 1 legend for a groupplot? Why is the scale 10^(-3) appearing below the first plot? Here is ...
1
vote
2answers
598 views

Remove border around area legend rectangle

I have a legend with the option area legend to draw a little rectangle in the legend instead of a line segment. There is a border around the rectangle I would like to either remove or make the same ...
2
votes
1answer
168 views

ytick pgfplot issue

I have the following latex code but unfortunately cannot get the ytick to be of my choice. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{center} ...
6
votes
1answer
258 views

Problem of superimpose and how to change legend symbol

Given the plot as follows I have two problems: a and b are superimposed on each other, how should I make this clear on the graph? How could I change legend c to other icons like star? (It looks a ...
5
votes
1answer
504 views

Pgfplots, Legend Color

I have the following problem: I Have a TikZ Picture with two data plots, each with a different color. I want each one to appear in the legend, and I'm using \addlegendentry. The problem is that Latex ...
2
votes
1answer
150 views

How to make the legend border tighter?

I am trying to make the legend border tighter. What is the \begin{axis}[legend style={...}] property to adjust the legend border (both width and height of the border)? \documentclass{article} ...
5
votes
1answer
641 views

How can I adjust the column width of legend in PGFplots?

I would like to adjust the width of the legend lines (images) in PGFplots. Since legend is a TikZ matrix, I can adjust the separation between lines, space between text and lines by changing the matrix ...
1
vote
0answers
55 views

fix position legend in pgfplot [duplicate]

Possible Duplicate: Put legend (pgfplots) below the plot I'm trying to set correctly the right position of the legend of my plot. I would have the legend just bottom right of my plot. Any ...
4
votes
0answers
77 views

LaTex Pgfplots Two axes 1 legend [duplicate]

Possible Duplicate: Using a pgfplots-style legend in a plain-old tikzpicture I'm trying to accomplish this: I have a plot with two y-axes. The first y has two plots, the second has one. I ...
2
votes
0answers
140 views

How can I adjust the width of legend images in PGFPlots? [closed]

I am using pgfplots to create charts. How can I adjust the width of images of legend entries? I have adjusted plot coordinates in legend image code in the line legend style, but this not worked ...
3
votes
0answers
227 views

pslegend bounding box odd while using Cirkuit

This question is regarding pst-plot and more specifically \pslegend. The code below produces the two following plots: One of these figures is generated without the \pslegend and it appears to have ...
5
votes
1answer
8k views

Put legend (pgfplots) below the plot

I have a pgfplot where the legend is right to the plot. I create the plot as follows: \begin{axis}[ scale only axis, xmode=log, ymode=log, width=7cm, legend cell align=left, ...
5
votes
2answers
2k views

pgfplot column chart legend shape

I have the following code in Latex using gpfplot. The legend in the generated graph always looks like the image attached. There are two boxes instead of one for each entry. Why this is happening? How ...
5
votes
1answer
2k views

Two columns in legend in pgfplots

I know how to create a legend in a pgfplots plot. See Legend in tikzpicture and Using a pgfplots-style legend in a plain-old tikzpicture. But I do not know how I can create a legend with two ...
1
vote
1answer
579 views

Marker color in legend

Since I updated to TexLive2012 yesterday, I can't get ant colored markers in my legend. Where as first I could put the following in the \addlegendentry options, it now won't work. ...
9
votes
2answers
1k views

pgfplotstable: How to access column name?

I have used \pgfplotstableset to assign column names in the preamble. However, I don't know how to access them. \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots, pgfplotstable, ...
9
votes
1answer
1k views

Pgfplots axis, option to remove (or ignore) legends

Is there an option in pgfplots at the axis level or a setting of legend style option, that would effectively ignore the subsequent legend entries in the plot? \documentclass{article} ...
6
votes
1answer
249 views

Is it possible to combine cases with pgfplots legend?

I would like to print a function and add a legend which makes use of cases. The current code is: \documentclass{article} \usepackage[pdftex,active,tightpage]{preview} \setlength\PreviewBorder{2mm} ...
3
votes
1answer
315 views

Use symbols with \label and \ref in custom legend

I would like to build a legend entry that refers to two simultaneous plots, because it is more intuitive to do so. I use \label and \ref to refer to the plot symbols, but they are shifted in the ...
5
votes
1answer
792 views

Manually add legend symbols in text (without \label and \ref)

I would like to add legend symbols from pgfplots in my text. I am aware of the possibility to use the \label and \ref commands but my setup is complicated and I fear that making it work will more time ...
1
vote
1answer
292 views

Vertically aligned legend to PGFPlots subplots

What I want to do is to have 3 PGFPlots subplots and the legend arranged in four equally sized boxes. However, when I use the following code, in the output the legend is not vertically aligned with ...
7
votes
1answer
652 views

Custom legend for intensity plot

I created an intensity-plot (x and y axes are positions, the color of the point gives the intensity) in an external program (igor pro) and included the "bare" plot via the \addplot graphics command ...
3
votes
1answer
248 views

Plots with only a few scattered marks and correct legend

I would like to draw several plots with lines and only a few marks. The markes are irregularely spaced, so I used a method alluded to in the pgfplots manual, section 4.8.5 (Legend appearance), page ...
2
votes
1answer
506 views

How can I add a legend in aligned subplots

I want to have two subplots with the same x axis aligned above one another. In the manual I read, that I should use \matrix{} to achieve this. Now I want to have legends in both plots. But since the ...