{pgfplots} is a package for creating 2D and 3D plots of mathematical functions and numerical data, using the PGF graphics framework. For questions about the inbuilt plotting functionality of TikZ/PGF, use {tikz-pgf} instead.
1
vote
0answers
39 views
pgfplots: How to change the alignment of one single node [duplicate]
Possible Duplicate:
How to display labels on points of a tikz plot
I plot a scatter plot using pgfplots and automatically label every single mark with its description. When two marks are ...
5
votes
2answers
447 views
PGFPlots: line opacity gradient?
Imagine a very simple PGFPlot, e.g.:
\begin{tikzpicture}
\begin{axis}
\addplot+[no marks]{x^2};
\end{axis}
\end{tikzpicture}
How can I have the line "fade out" from the left to the right of the ...
7
votes
1answer
337 views
pgfplots black and white line graph
hi refered the pgfplots user manual but found no instructions as to how one can proceed with creating a black and white line graph. My graph is as follows
\begin{figure}[H]
\begin{tikzpicture}
...
4
votes
1answer
186 views
Impossible Tikz error
I'm using matlab2tikz to generate the tikz code for my figures. When compiling the document with the figure code as below, i get an error:
Package pgfplots Error: No such element: ...
7
votes
2answers
374 views
TikZ/PGF: Simple function is not plotted. Where is the mistake?
I'm just starting to learn TikZ/PGF. I would like to draw a simple function, f(x) = x² to start with.
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
...
5
votes
0answers
210 views
Switching math fonts and back to normal fails in figures?
For my current document I want to use a normal serif font for the main text. Most diagrams from other sources and myself are with sans serif fonts (TeX Gyre Heros). Now I want to use pgfplots to ...
0
votes
0answers
212 views
PGFplot Polar is plotting negative numbers on positive axis [closed]
\begin{tikzpicture}
\begin{polaraxis}
\addplot +[mark=none, domain=0:360, samples=200]{(2.44*5.12*2.44-20*cos(x+90))};
\end{polaraxis}
\end{tikzpicture}
Quick example above, this is on a ...
3
votes
1answer
249 views
Is there a common pgfplots styles/templates repository
I (try to) use the same plot layout in pgfplots everytime. I keep having to input the same details and although I do my best to cut and paste, it would be great if there were a simple set of chart ...
6
votes
1answer
240 views
PGFplots, two colours under and above curve
I'm using PGF plots and would like to fill two colours to my plot. One colour indicates a positive value, while the other colour for negative values. What I have so far is one colour for the entire ...
5
votes
1answer
2k views
3D surface plots in TikZ
I need to plot a surface plot using TikZ. I have the (x,y) coordinate and the corresponding function value in a table form. I have not done 3D plots before in TikZ and hence I would appreciate any ...
2
votes
1answer
301 views
pgfplots: putting marker labels outside of the plot
the following code:
\documentclass{article}
\usepackage[english]{babel}
\usepackage{pgfplots}
\usepackage{tikz}
\usepgfplotslibrary{groupplots}
\begin{document}
\begin{figure}
...
4
votes
1answer
170 views
Legend referencing in caption *and* externalization
I am trying to make a reference to a plot inside a figure's caption
while using the externalize library.
The issue of plot reference using externalization has already been
raised in this question.
I ...
5
votes
1answer
917 views
PGFplot histogram using multiple barplots
I'am trying to create a colored histogram using barplots using the following code:
\begin{tikzpicture}
\begin{axis}[ybar,
ymin=0,
bar width=0.2cm,
axis x line*=left,
nodes near ...
5
votes
1answer
155 views
remove y scaled label in pgfplot graph
I wanted to divide the y coordinate values by 1050 so i used scaled y ticks=real:1050
Here is my code
\begin{figure}[H]
\begin{tikzpicture}
\begin{axis}[
scaled y ticks=real:1050,
height=9cm,
...
1
vote
0answers
54 views
How to split y axis in pgfplots to display differing datasets in one graph? [duplicate]
Possible Duplicate:
Axis break in pgfplots
I'm trying to convince pgfplots to display my measurement results. It works quite well except the fact that the datasets vary in numbers. Most of ...
4
votes
1answer
225 views
how to remove pgfplots circular points
In the graph below, there are large circular point marks. Is there a way of removing them?
My graph code is
\begin{figure}[H]
\begin{tikzpicture}
\begin{axis}[
height=9cm,
width=12cm,
...
1
vote
2answers
225 views
pgfplots - axis xmode/ymode in user-defined style
I would like to specify xmode and ymode for the axis with \pgfplotsset (or any other way, so that the mode can be changed by an if statement) The error message which I get is:
! Package pgfplots ...
8
votes
1answer
284 views
pgfplot: use pgfmathdeclarefunction defined function within coordinate
This code snippet defines a simple function using \pgfmathdeclarefunction (e.g. f()) and \pgfmathparse. I would like to use the defined function f() within other coordinate, e.g. (0.2, f(0.2)) vs. ...
3
votes
2answers
177 views
Numbers as markers with \foreach and additional macro based on counter
First issue
I would like to plot several curves using the \foreach command and
have their number in the sequence as markers.
Here is the code I came up with :
\documentclass{article}
...
4
votes
2answers
327 views
How do I get a % sign in symbolic x coords in pgfplots
I have some data I want to plot in a bar chart where the name on the x-axis should have a % sign in it. So this works:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
...
4
votes
2answers
370 views
Pgfplots and beamer: how to fill the area under a curve with oblique lines (hatching) as a pattern?
This is a follow up question to Jake's solution to that post.
Although I got Jake's solution there work in LaTeX document perfectly fine, I could not get it work in beamer. Here's Jake's code but ...
3
votes
1answer
551 views
Using pgfplots in beamer
I want to plot the following data in one slide
%-----------------------
\documentclass{beamer}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{filecontents}
\begin{document}
\begin{frame}[t]
...
2
votes
1answer
258 views
How to format y tick label into a consistent decimal style in pgfplots
I have this plots .
It is generated by the pgfplots code at the bottom. For the y tick labels, instead of the one shown in the figure, I would like to have {2, 4, 6, 8, 10} by the y ticks, and a ...
2
votes
2answers
300 views
Enlarge limits by absolute value when using symbolic coordinates
How can I expand the x-axis by, say 1cm, in both directions in the following bar plot?
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ybar,symbolic x ...
3
votes
1answer
290 views
How can I mark a x-coordinate?
I made a little plot for the birthday paradox. It looks like this:
This is perfectly fine, but I would like to mark x=23. So my question is:
How do I get the following lime line?
This is the ...
5
votes
1answer
560 views
Drawing node in tikz with both background fill and grid pattern?
Is it possible to use the grid pattern on a node but also setting a background color to it, say blue?
I want to use something like
\node (b) [fill=red, pattern=grid] {b};
I am aware of the ...
0
votes
0answers
112 views
Changing the binary operator for tick scale labels [closed]
I'd like to change the tick scale binary operator to \times symbol, but I am getting an error.
Here is a MWE:
\documentclass[12pt]{article}
\usepackage{tikz,pgfplots}
\begin{document}
...
8
votes
1answer
555 views
pgfplots need help with complicated stacked bar chart using selected rows from data table
I'm trying to recreate this bar chart from the data table found in the MWE below.
It involves doing a couple things that I can't figure out:
stack positive and negative bars on the same axis, ...
5
votes
1answer
159 views
How to reference plot in legend?
I want to reference a plot in the legend. The problem is, that the little legend image from the blue plot is shown distorted in the legend.
Here a minimal example:
\documentclass{minimal}
...
4
votes
1answer
287 views
How to sort table for plotting with pgfplots?
Is it possible to sort a table at the point that is included in a pgfplot. In the example below, the point x=3 and x=4 are ordered for plotting. I am looking prefereably for an 'in-place' solution, ...
8
votes
3answers
463 views
Disabling the arrows that appear in pgfplots on the axes
By default in PGFplots, when axes are only shown in the bottom left corner, arrows appear at the end of the ends of axes lines. How can I change the defaults so these arrows do not appear?
Edit: ...
2
votes
1answer
362 views
Automatic data recognition and plot processing in pgfplots
I am a beginner in LaTeX, trying to use it for industrial documents, such a measurements report. One example is the true position graph of the MWE. The circle represents the true position tolerance. ...
4
votes
2answers
354 views
PgfPlots with labeled plots extend outside the graph box
Sorry for the confusing title.
The MWE
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=0.75]
\begin{axis}[ylabel=Y-Axis, xlabel=X-Axis, ...
5
votes
1answer
234 views
PgfPlots Vertical Asymptotes Are Cut Short
The following MWE
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=0.75]
\begin{axis}[ylabel=Y-Axis, xlabel=X-Axis, xmin=0.000, xmax=0.9, ...
3
votes
3answers
514 views
Use TikZ foreach variable in node
This MWE
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=0.75]
\begin{axis}[ylabel=Y-Axis, xlabel=X-Axis
, xmin=2, xmax=10, ymin=0, ymax=12, ...
4
votes
1answer
633 views
PgfPlot with Y-axis only on the right hand side
I'm trying to draw graph similar to the one below with the Y-axis only on the RHS.
The following MWE produces something close the desired result:
\documentclass{standalone}
\usepackage{pgfplots}
...
1
vote
1answer
356 views
TikZ Label multiple plots outside of axis box
I'm endeavouring to make a graph similar to the following using PgfPlots and TikZ.
I can make all of this work, except for the placement of the R=2, R=3, R=5, and R=10 markers on the left-hand ...
5
votes
1answer
325 views
PGFPlot formatting help
I have the following pgfplot:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{every axis legend/.append style={
at={(1.05,1)},
anchor=north west}}
\begin{document}
\begin{tikzpicture}
...
6
votes
1answer
965 views
pgfplots using strings *from data table* as x axis labels in bar chart
I've seen some of the other threads on using strings as x axis labels, but nothing that fits my situation.
I'm trying to create a bar chart from a CSV file. I can do it so long as everything in the ...
4
votes
1answer
586 views
Package pgfkeys Error: I do not know the key '/tikz/ '
I have an error when I want to compile the LaTeX code below when I set \var to 1.
Otherwise I have no problem.
The error I got is: Package pgfkeys Error: I do not know the key '/tikz/ '
Could you ...
24
votes
2answers
1k views
What is the clearest way to graph a piecewise function?
I have a function defined as:
How can I graph that using functions instead of coordinates? I'm currently working with pgfplots but I'm open to something else if it's better.
2
votes
1answer
281 views
Create a ybar interval from given bar widths
I am collecting data using the NASA Task Load Index, which gives 6 scales and has a weight associated with each scale. I am trying to plot the mean value for each scale using a ybar interval graph, ...
2
votes
1answer
322 views
How can I produce a mosaic chart / Marimekko chart?
I would like to make a stacked ybar plot with three stacked components on each bar, with each component divided vertically into three percentage components (the total width of these components stay ...
6
votes
1answer
458 views
pgfplot: groupplots — how old?
I'm trying to reproduce some examples from the pgfplot documentation, but \usepgflibrary{groupplots} does not succeed, while shapes does. In the documentation I can't find a hint if this feature is ...
15
votes
1answer
862 views
Waterfall Chart
For displaying the total effect of a series of values, a waterfall chart can be useful. For example this chart, taken from The Economist, illustrates estimated efficiency potentials in the UK public ...
2
votes
2answers
376 views
Using node shapes or self made tikzpicture as image in legend
I am using the solutions of
Using a pgfplots-style legend in a plain-old tikzpicture
and
Legend in tikzpicture
to create a legend in a tikzpicture.
In this legend I need a cylinder as image. I ...
5
votes
1answer
284 views
Calculate and draw multiplying, dividing or adding of two plots automatically
My question is related to Calculate and draw difference of two plots automatically, if in that site asking how to make a-b, I am asking you how to make plots as result of a/b and a*b and if you dont ...
4
votes
1answer
606 views
label curve and/or contour name created with pgfplot via gnuplot
I will want to name different contour as one can see it on topographic card. How to do that?
I want label on different curve with the parameter that distinguish the curves. I have created 10+10 curves ...
7
votes
1answer
490 views
Calculate and draw difference of two plots automatically
I'm trying to automatically generate a plot, which visualizes the difference of two other plots. The input source is a single(!) file. The data is filtered by one column with /tr/rowfilter. Here is an ...
5
votes
2answers
292 views
pgfplots: how make axes go through origin?
For pgfplots, in all the 2D examples I've seen, and in the manual, the location of axes seems to be specified in terms of location within the plot box, i.e.,relative to top, bottom. How does one ...
