{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.
3
votes
0answers
86 views
How to correctly set a colorbar for an external graphic? [closed]
I created a pdf file from a Matlab imagesc plot. I have remove the colorbar and axis and now I want to have this image in my tex document. I manged to get the axes almost as I want them, but the ...
1
vote
0answers
37 views
How to I fix my axis to suit the correct order of magnitude? [duplicate]
Problem:
It's the times ten to the 3 bit part which bothers me. Not just that is exists but also because it's positioned itself in a strange place.
My files is formatted so it is in MHz so I don't ...
3
votes
1answer
94 views
How can I fix the formatting of my axis using pgfplots so the axis titles aren't on top of the numbers?
How can I offset my ylabel so it doesn't smudge with the numbers?
code
\begin{figure}[H]
\centering
\begin{tikzpicture}
\begin{axis}[
scale=1.8,
xmin=-15,xmax=15,xlabel={Current $mA$}, ...
1
vote
0answers
69 views
standalone pgfplot with extra include in subdirectory -> no output
I am trying to generate a pgfplot with data in a textfile as a standalone document.
I am using the 1.2 version of standalone from https://bitbucket.org/martin_scharrer/standalone/downloads because it ...
4
votes
1answer
95 views
Pgfplots gives spurious lines in external mode with geometry
This is not a major problem but all the same I would like to confirm that I am not doing anything wrong. Geometry package with showframe=true option is used to see if all the figures are within the ...
4
votes
1answer
151 views
Fading of horizontal lines is impossible?
The path fading option in TikZ is obviously not working for horizontal lines.
For plotting constant functions as well as for drawing a line between two points. Making them slightly tilted solves the ...
0
votes
1answer
121 views
Create standalone pictures
I am trying to write a sample code to be used as a template to generate pictures that will be latter included in a paper. At this stage, the pictures are only plots.
I have the following code. But it ...
4
votes
1answer
200 views
External graphics and tikz externalize won't work together
I am using the tikz library external a lot and with success - so far. Now, I need to import an external file (eps, png, pdf... I don't care), and add the axes. I know I can do this with \addplot ...
7
votes
2answers
153 views
Background color in pgfplots that extends beyond the axis of the plot
I am interested in adding a background-color to my pgfplots plot that extends beyond the axis of the plot. See the image bellow for clarification; I am interested in adding a background color such as ...
18
votes
2answers
3k views
number format in pgfplots axis
How can I change the type of the decimal/thousand separator from the american one to the european one? More precisely, I want:
"1000" to be written as is, instead of "1,000"
"0,1" instead of "0.1"
...
9
votes
2answers
109 views
pgfplots: get color setting from table
I want to plot multiple lines using pgfplots.
Each of the lines should have a color, depending on the group it belongs to.
In the example attached, a table is provided, containing all the ...
3
votes
2answers
173 views
tikz plots alignment
I'm trying to produce a figure using
\begin{figure}
\centering
\makebox[\columnwidth]{\input{try1.tikz}}
\makebox[\columnwidth]{\input{try2.tikz}}
\end{figure}
The files try1.tikz and try2.tikz ...
4
votes
1answer
187 views
How can I force the pgfplots coordinate system and the tikz coordinate system to match and why do they not match by default?
I plot a function with pgfplots and want to combine it with some simple \draw commands from tikz. But to my suprise the coordinate systems seem not to match. The rectangle drawn ranges from x=-10 up ...
4
votes
1answer
106 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}
...
2
votes
2answers
394 views
How can I install pgfplots on the home directory with or without sudo rights?
I need to use some packages at my uni network so I can compile my projects there too but I am pretty sure it doesn't have pgfplots (from looking at the log) perhaps some others.
All the tutorials ...
1
vote
1answer
89 views
Does anyone know if the listed prerequisites for TikZ's pgfplots package are slightly off?
Does anyone (not to specifically ask Christian) know if the prerequisite PGF/TikZ version listed in the PGFPlots manual is off by a bit? I've been trying to use \tikzset{external/mode=list and make} ...
1
vote
1answer
68 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 ...
2
votes
2answers
175 views
How to ensure equal font sizes in all included TikZ/pgfplots figures?
I would like to have many tikzpictures in my document. Since each tikzpicture has its own size, I don't know how to manage the font size among all the pictures. Some of tikzpictures are of size ...
8
votes
1answer
92 views
How to switch x- and y-axes?
Is there a simple way to switch the x- and y-axes, so that the x-axis becomes the vertical axis?
\begin{tikzpicture}
\begin{axis}
\addplot+[domain=0:10]{1.2*0.000001*(0.2*(x*1000)^2 + 700*x*1000 + ...
2
votes
2answers
147 views
Problem in adjusting contour label color and numbr of samples in pgfplot
I am trying to create a contour plot using TikZ. I have two questions:
How can I change the contour labels color to all black?
Is it normal that gnuplot responds slow for creating smoother contour ...
3
votes
1answer
135 views
pgfplot — label, referencing and caption
I've the following pgfplot:
\begin{center}
\begin{tikzpicture}
\begin{axis}[
xlabel = Number of threads (\#),
ylabel = Task completion time (seconds),
...
5
votes
0answers
109 views
Adjustable absolute axis labels in pgfplots
How can I use absolutely placed y labels, but still adjust the absolute placement? In the below example, I want to be able to get the two plots to align exactly, including the y labels.
If I add
...
7
votes
1answer
198 views
Grouped bar chart
I'm trying to construct a grouped bar chart and have three questions I can't seem to find the answer to:
1) How do I modify the spacings between the groups? Or at least make sure that no bars are ...
7
votes
0answers
219 views
Multiple axis discontinuities with pgfplots
I want to show narrow segments out of a large spectrum. Since it is one spectrum, I want to use one single plot, but hide the irrelevant parts. To make clear that I show disconnected parts, I want to ...
2
votes
0answers
53 views
Bounding box calculation in groupplots suddenly fails? [closed]
Suddenly some graphs changed in my documents. I have not the slightest idea what changed but as of today the bounding box calculation for some plots created in pgfplots is going haywire. My MWE looks ...
7
votes
1answer
174 views
Problem in increasing the distance between labels in contour plot in a TikZ picture
I am having problem in increasing the distance between the labels in a contour plot in a TikZ picture. I tried a value from 10 to 10000 for the key contour/label distanc just to have only one label on ...
1
vote
0answers
58 views
Multiple Labels on X coordinate when using symbolic coordinate [closed]
I am using pgfplots to plot bar charts; when I try to use symbolic labelling for the x coordinates, I get the labels repeating. Any ideas why, the snippet is below.
\begin{figure}[!h]
\centering
...
5
votes
2answers
276 views
Horizontal waterfall chart with labels for each bar
I've looked through similar questions here and here, but I'm still stuck. Basically what I'm trying to achieve is this plus bar labels:
I have two problems:
1) My code sucks. Right now the y-axis ...
4
votes
1answer
144 views
How to draw an additional line over an existing TikZ figure?
\documentclass[border=5mm] {standalone}
\usepackage{pgfplots, pgfplotstable}
\begin{document}
\begin{tikzpicture}
\pgfplotstableread{ % Read the data into a table macro
Label First Second ...
5
votes
1answer
79 views
Draw group line error
How draw group line works? I tryed to use this example, but when chaged the index it gives me an error:
Undefined control sequence \end{axis}
CODE:
\documentclass[conference]{IEEEtran}
...
10
votes
1answer
327 views
How to plot circular polarized electromagnetic wave
I am searching for a solution to get nice looking circular polarized waves in my latex document. My goal is to get a graph that looks like this:
I do not want the graph to be animated but I can not ...
2
votes
0answers
39 views
Increase the X length of a tikzpicture [duplicate]
This is the code that i'm using (Thanks to percusse in here):
\documentclass[conference]{IEEEtran}
\usepackage{lipsum} %<-- For dummy text
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}
...
2
votes
1answer
182 views
Tikzpicture in a two column way using a one column .cls template
I'm using a .cls IEEEtran from IEEE available here http://www.ieee.org/conferences_events/conferences/publishing/templates.html; and all document is in two columns.
I'm ploting using pgfplots a ...
1
vote
1answer
94 views
Problem in modifying contour label style in pgfplots
I am trying to modify the contour label style in a TikZ picture. I would like to have the label values in the format 0.0 instead of being integers. The following code produces a picture in which ...
4
votes
1answer
256 views
Plotting functions with parameters from an external file using gnuplot/pgfplots/pgfplotstable
If I have a table, how can I get the table values and use them as parameters for plotting in pgfplots in gnuplot? In particular, how can multiple curves be plotted with the same functional form from ...
6
votes
1answer
226 views
Axis ticks in radians in polar pgfplots
I am using the polar library with pgfplots to plot a graph like this:
\begin{tikzpicture}
\begin{polaraxis}
\addplot[mark = none, domain = 0.4:12, samples = 600, data cs = polarrad]{sin(x)};
...
5
votes
0answers
323 views
Trying to make an automatic histogram (in pgfplots?)
How can I convert the automatic table generated by the macro, to an automatic histogram?
Is the best way do it using pgfplots?
\documentclass{article}
\RequirePackage{ifthen}
...
3
votes
1answer
81 views
What does error bars/.cd do?
In pgfplots, if you want error bars, you have to write error bars/.cd into each addplot that should have error bars. What does it mean and what does it do and why do I need it?
8
votes
1answer
117 views
pgfplots - Provide a detailed plot inside the main plot
I have a main plot and inside it I would like to add a smaller plot that offers the reader a higher level of detail.
A rough illustration of the above is:
Notice that the smaller plot provides a ...
3
votes
1answer
100 views
PGFPLOTS coordinate filtering as a style?
I am using pgfplots to make plots for my thesis, and I have many scatter plots that I want to have consistent formatting. I am controlling the shape and color of the scatter plot marks with two ...
2
votes
1answer
97 views
biblatex and pgfplots
I'm using pgfplots to plot some graph of data I stored in a file (a lot of data points). If i charge the bibtex package and I obtains the famous error:
TeX capacity exceeded, sorry [main memory ...
1
vote
0answers
37 views
In pgfplots, font=\small throws undefined control sequence [duplicate]
I would like to reduce the label font size in a pgfplot.
When I do x tick label style={rotate=90, anchor=east}, the file compiles, when I do x tick label style={font=\small,rotate=90, anchor=east}, ...
6
votes
0answers
70 views
Omitting a range when plotting with pgfplots [duplicate]
I have to plot data of the following format:
year,value1
-10000000,10
0,10
1890,10
1900,50
1930,500
1970,1500
2000,4000
Using standard pgfplots I do this:
\documentclass{article}
...
2
votes
1answer
81 views
Lines missing in the graph
The code
\pgfplotsset{mystyle/.style={mark=none}}
\begin{figure}[t!]
\resizebox{.4\textwidth}{!}{\begin{tikzpicture}
\begin{axis}[title=QWS Dataset,
legend pos=outer north east,
...
3
votes
0answers
137 views
Naming 3D axes in pgfplots
I want to label the axes in a 3D plot with pgfplots. Using the anchors .right of origin and .above origin, I can label the axes as "x" and "y" in 2D with ease. In 3D, the labels must be tweaked to ...
3
votes
1answer
112 views
Axis label placement in 3d plot far out but why?
I want to plot a dataset in a 3D pgfplots graph. It looks like a good start but somehow the label placement is far out. Boiling it down to a MWE did not give me any hints how to get the labels back in ...
9
votes
1answer
213 views
Long yticklabels increase height of bar plot too much
With the help of Jake I'm able to create bar plots with variable heights ( Space between bars, height and width of the plot ). Some bar plots have single very long yticklabels that need line breaks. ...
2
votes
1answer
137 views
How can I integrate matplotlib plots with pgfplots?
The python plotting library matplotlib will by default add margins to any plot that it generates. They can be reduced to a certain degree through some options of savefig(), namely bbox_inches='tight' ...
4
votes
0answers
84 views
Time plot with pgfplots
I tried to plot this type of data
x y
00:00 99.42
00:15 99.44
00:30 99.41
00:45 99.37
01:00 99.00
01:15 99.29
01:30 99.51
01:45 99.58
02:00 99.49
02:15 99.50
...
8
votes
1answer
198 views
pgfplots data time format
I have this type of data set:
Time State
22:54:14.716 5
22:54:14.716 5
22:54:14.716 5
22:54:14.716 5
22:54:14.729 4
22:54:14.919 1
22:54:14.919 1
22:54:15.128 5
I ...

