{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
1answer
24 views
PGFplots axis with arrow tips at the end
By using the following code:
\begin{tikzpicture}
\begin{axis}[xmin=0,xmax=40,ymin=0, ymax=42, xlabel=Φρούτα,ylabel=Γάλα]
\addplot [color=Blue] coordinates {
(0 ,40)
(20, 30)
(30, ...
3
votes
1answer
21 views
Changing the format to a plot ticks (using pgfplots)
Dera all:
I'm using pgfplots to plot the data from the table below (forst vs. fourth column),
3000 1.2970e+00 0.198956 0.258046
3100 8.6050e-01 0.18747 0.161318
3200 ...
4
votes
2answers
38 views
Placing text inside graphs using pgfplot
My node markers disappear using this code. Is there a better way to do this?
\documentclass{article}
\usepackage{amsmath}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[domain=0:3]
...
5
votes
2answers
66 views
Adding jitter to a straight line
I have found a post about: How to add a jitter to a scatter plot with pgfplots. I'd like to add jitter to a straight green line to recreate this graph..
Would this be the best way do you think? Also ...
4
votes
1answer
40 views
Modified pattern does not see the pattern color option
I have modified the north east lines pattern to accept a \LineSpace option that sets the density of the pattern (see the question Can I control the density of a pattern in TikZ?). The code works very ...
3
votes
1answer
81 views
Multiple Y-axis plot (4 Ys YY-YY)?
Can someone help me creat a figure like the attached one which is generated by Origin Lab?
According to Jack's suggestion, I made my tex code as follows. The last thing I have to complish is the ...
5
votes
1answer
45 views
Bug with smooth style and \closedcycle in PGFPlots
Could you please confirm the bug?
\documentclass{standalone}
\usepackage{tikz,pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis lines=middle,xmin=0,ymin=0]
...
8
votes
2answers
95 views
how can I change the exponential value to decimal?
I want to make my plot completely in decimal. I used the function
\pgfkeys{
/pgf/number format/precision=1,
/pgf/number format/fixed zerofill=true
}
to make my decimal like 2.0 instead of ...
1
vote
0answers
47 views
Free space in bar-chart with empty entries
I would like to plot some data set with the ybar option of pgfplot.
But not all entries are nonzero.
The zero entries waste space between the bars and when the plot gets crowed it is not clear anymore ...
1
vote
1answer
46 views
Strange behavior with \draw within axis environment
Consider the following snippet of code:
\documentclass{standalone}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\draw[-latex,cyan] (axis cs:0,0) -- (axis cs:1,1);
\addplot coordinates ...
4
votes
1answer
47 views
Adjusting the distance between label and axis in pgfplots
The single label of following plot is intersected by the curve. How can I make it a little far from axis and point to axis by a dashed line?
\documentclass[border=5mm]{standalone}
...
6
votes
1answer
59 views
How to change the scale between ticks
Is it possible to change the spacing between two ticks?
4000-3000 = 3000-2000 = 2000-1500 = 1500-1000
\begin{tikzpicture}
\begin{groupplot}[
group style={
group name=my plots,
...
4
votes
1answer
51 views
Consistent distance between bar plot groups of different sizes
I'm trying to make a bar plot where i always have one single bar paired against multiple bars. Two problems arise -- first, the first bar is assumed to have 6 other bar buddies and gets pushed to the ...
14
votes
1answer
103 views
How to add a regression line to randomly generated points using pgfplots in Tikz?
\documentclass{article}
\usepackage{tikz}
\usepackage{color}
\usepackage[active,pdftex,tightpage]{preview}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\begin{document}
\begin{tikzpicture}
...
5
votes
1answer
64 views
Pre-defined color cycles à la RColorBrewer?
When I have multiple line plots in pgfplots, the colors of the lines cycle through a few colors (my guess is the colors are blue, red, black and dark khaki) before repeating with different marks. See ...
4
votes
1answer
38 views
Problem importing a table containing dollar signs in pgfplots
I use pgfplot for plotting (obviously).
I load a table from a file, but I have the problem that my columns can have a dollar sign in them and then LaTeX complains:
! Extra }, or
forgotten $.
...
1
vote
1answer
45 views
Gap between xaxis and bars in tikzpicture
I am adding a bar chart with tikzpicture and I am getting a strange gap between the bars and the y axis. Am I doing something obviously wrong? Because my other bar charts works fine... Should I ...
4
votes
2answers
71 views
Add text around the X label
Fig 1 is generated by Matlab, and the following code is created using Matlab matlab2tikz package. The different between Fig. 1 and Fig.2 is the position of % symbol. Fig.2 is produced by the converted ...
1
vote
1answer
52 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 ...
1
vote
0answers
41 views
How to turn off the axis in tikz plot? [duplicate]
Anyone knows how to let the axis disappear from my plot.
\begin{tikzpicture}
\begin{axis}[colorbar]
\addplot3
[surf,faceted color=blue,
samples=15,
domain=0:1,y ...
4
votes
1answer
49 views
Display problems when plotting large datasets (unwanted spikes)
I have a problem concerning pgfplots and large datasets. I have the following minimal example:
\documentclass{scrartcl}
\usepackage{tikz}
\usepackage{pgf}
\usepackage{pgfplots}
...
7
votes
0answers
130 views
Unsung Heros - PSTricks, TikZ, pgfplots,
While watching presentations (mostly made with beamer) at my university I noticed, most people here use LaTeX to create there presentations which is really nice. (not just for the health of my eyes)
...
4
votes
0answers
39 views
pgfplots: percentages and endvalues in stacked ybar
I have two questions regarding the pgfplots package. I have attached the source code I worked on. There are two features I am not able to realize:
I would like to put the total value (sum of the ...
3
votes
0answers
70 views
Using `external` selective for TikZ-pictures
For the following example:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{calc,external}
\usepackage{pgfplots}
\tikzexternalize
\begin{document}
...
5
votes
1answer
48 views
Change font family in pgfplots (followup)
The MWE below shows that the solution at How can I change the font family in pgfplots? does not cover all the cases. The digits in the plot itself and the subscript in math mode in the title need ...
3
votes
0answers
44 views
Increasing dateplot's resolution to seconds
These three dots should be spread out over a period of 50 seconds, but for some reason they all appear at 13:00:30.
\documentclass{minimal}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
...
3
votes
1answer
55 views
Scaling a multi-column TikZ/pgfplots groupplot to page width
I am trying to scale a pgfplots groupplot with multiple (and variable numbers of) subplots to match the \textwidth of a document.
What I found is that there seems to be no direct relationship between ...
5
votes
2answers
77 views
colored dotplot with pgfplots
How can I control the color of a dotplot created with pgfplots?
I tried the point meta key, but apparently I did not get it right, since it is not respected.
\begin{edit}
I would also like to have ...
3
votes
1answer
67 views
! Dimension too large
I keep getting the error Dimension too large when i make my \Desktops{80} and my \DTUnits{20} however if I change my \DTUnits{14} it works, can someone help me please?
...
6
votes
0answers
81 views
externalize pgfplots, and only pgfplots
I would like to externalize the plots in my document (using pgplots), but not other inline stuff, such as bonds automatically drawn by chemmacros. That is, in the following test document:
...
2
votes
1answer
93 views
Adding extra ticks inside the axis environment
I am wondering if it is possible to add extra ticks to a plot without declaring them in the options of \begin{axis}. Consider the following example, where I would like to have the coordinates of the ...
6
votes
1answer
69 views
How to Graph Floor/Ceiling Functions in LaTeX (PGFPlots)
I am trying to make a graph of some floor/ceiling functions for examplep the floor of 3x+2 like this: http://www.wolframalpha.com/input/?i=graph+of+floor%283x%2B2%29#=.
However, I searched through ...
4
votes
1answer
52 views
Stretch y-axis in pgfplots
I'm using pgfplots for simple plotting 2-dimensional data from a plain datatable file. What i try is to "stretch" the y-axis by a factor (say currently i have stretched it by factor '1' which is the ...
8
votes
1answer
110 views
Background image for pgfplots chart
Following up on the answer to proper tool for charts in tex I've built this picture to simulate/replace a scanned image from a newspaper:
I've tried several ways to put the background newsprint ...
10
votes
3answers
179 views
How to plot a surface from a set of data?
Disclaimer: I already read questions like 2D surface on a 3D surface plot external data in a file and 3D surface plots in TikZ but these did not solve my problem.
I have this set of data:
x y ...
5
votes
1answer
46 views
Reverse xaxis on polar plot
I'm tring to obtain a clockwise polar plot, keeping the zero in north direction.
The plot is correctly displayed but I can't fix the xtick style.
\documentclass[10pt,border=10pt]{standalone}
...
1
vote
0answers
46 views
pgfplots: Plotting one data set with label and the other without label
I am trying to generate a plot using two data series and have the labels just on one of the series, but not the other. In the following example I would like to see the labels on first \addplot, but ...
4
votes
1answer
48 views
pgfplots: using macro for tick label
I would like to use a macro to define the label of an extra tick in a pgfplots picture. When the macro uses a greek character it generates an error:
! Missing \endcsname inserted.
Here is my MWE:
...
4
votes
1answer
54 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 ...
2
votes
1answer
68 views
pgfplots “dimension too large” with 3D graphic from external source
I want to include a 3D plot that I created in R.
The plot is prepared according to the example given for Matlab in the pgfplots manual.
I cropped the whitespace around the saved png, added ...
8
votes
1answer
58 views
Group together two and two bars in pgfplots
I have a bar plot and i would like to emphasize that two and two pairs belong together.
So i need some padding between Cornell Box and Conference Room, and Conference Room and Sponza. Also maybe a ...
2
votes
1answer
71 views
Externalize pgfplotstable with csv file
This is a direct follow-up question to this: Adding units to pgfplotstable header
After fixing the output I tried outsourcing the table. After figuring out that standalone does not work with ...
8
votes
2answers
90 views
Create x and y label which overlaps for multiple plots
I have a groupplot of 5x3. Now I want to be able to 'overlap', so to speak, the ylabel over all the plots vica versa for the xlabel. This enables me namely to make the groupplot smaller.
Currently I ...
10
votes
1answer
104 views
Presumed error of pgfplots in the “cutting” of a surface
I'm struggling with a 3D representation through the use of the package pgfplots. I'm faced with an alleged error in pgfplots (from my point of view). Consider the txt file (which is attached here) and ...
5
votes
1answer
101 views
Draw box around plot or fill plot area in tikz/pgfplots
I want to create a plot in tikz/pgfplots with a number of \addplot table commands. Each of the tables is the result of a simulation. I need to add a box around each simulation's result or fill the ...
2
votes
1answer
56 views
Create 2x2 groupplot with +1 plot to the side?
I want to create a 2x2 + 1 plot like...
---------------------------|
| Plot 1 | Plot 2 | |
------------------- Plot 5 |
| Plot 3 | Plot 4 | |
---------------------------|
How can I ...
4
votes
1answer
36 views
Expanding tick marks and labels beyond data set
I am looking to expand the y- and x-axis values beyond the data for visual reasons. I tried to force the ticks and labels, but it did not work. I wish the two axis to start at zero and end beyond the ...
5
votes
1answer
60 views
Undefined control sequence on \frac?
I'd like to generate PDF's for some ad hoc screenshots, but I'm getting an undefined control error. I tried \usepackage{amsmath} after the line \usepackage{pgfplots} but that didn't work. I thought ...
1
vote
0answers
41 views
Hiding Decimal Results from PGF Output
I have this \foreach statement which results in even numbers with decimals. I would like to omit or hide the decimal from the results. How can this be done simply? I have seen a few answers to much ...
4
votes
1answer
76 views
Read boxplot prepared values from a table
Update: Is there any possibility of drawing two box plots this way using a single datatable as in the updated MWE below?
I'm trying to use pgfplots 1.8's shiny new boxplot feature. As I am also ...



