{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
555 views
pgfplots: shadow for markers
I was wondering if it's possible to add shadows to markers within pgfplots. I tried the circular drop shadow option (from TikZ) which unfortunately had no effect at all. I also read that one can ...
7
votes
2answers
713 views
Change color of plots in pgfplots globally
In pgfplots I can change the color of plots locally as in the example below. However is there a way to change the color for all plots in a document globally?
\documentclass{article}
...
2
votes
1answer
466 views
Plotting area in the plane where two inequalities in two variables hold
I would like to plot the area in the plane where two inequalities hold, both involving two variables. I would like to do it the way Wolfram Alpha does it, but within a LaTeX document. I have looked ...
8
votes
1answer
860 views
Scaling colormaps with pgfplots
I have two surface plots, which I would like to have to same color for the same height. So, as the first plot is dark blue for f(x,y)=0, the right plot should also be dark blue for f(x,y)=0. However, ...
11
votes
2answers
2k views
Need to do some changes to pgfplots axis
I am still in the habit of learning TikZ, barely started using pgfplots to create my images
Although I am still not sure what the best way to do so is, I need to create the image below. My problems ...
4
votes
3answers
792 views
How do I set the aspect ratio of 2D (flattened 3D) surface plot?
I am trying to do a 2D surface plot, and the way to do this in pgfplots seems to be making a 3D surface plot, and then adjusting the view. And this works fine, until I try to adjust the aspect ratio. ...
2
votes
1answer
180 views
Wrong area plot
I'm trying to draw a plot from this table:
ip Min Std
0 19.86764349 97.20356138
16 19.86764349 250.079659
22 19.86764349 168.2253117
23 19.86764349 169.2514577
33 ...
14
votes
2answers
1k views
TikZ externalize, pgfplots and animate
I gave a very fetching presentation written with beamer today. It included a pgfplot animated with the animate package, and the result was fantastic. The problem? One of my colleagues wants to borrow ...
6
votes
1answer
1k views
multiple y axes in groupplot
I want to create a barplot with three groups. Compared are two criteria: water consumption and CO2 emission. To make it more comprehensive here the plot I already generated
I approached this ...
4
votes
1answer
1k views
Problem using matlab2tikz
I'm trying to get matlab2tikz to work. I want to use it for prettyfying output of Matlab's image() command.
In Matlab I tried
imagesc(rand(100));
xlabel('X');
ylabel('Y');
title('Random Colors');
...
9
votes
2answers
2k views
Image with axis
I need to plot some data in a file (10000 records of 2 points each one) but PGFPlot is very very slow rendering it. So I'm trying to use MatLab to plot the data, capture the image WITHOUT axis and in ...
10
votes
2answers
950 views
Coordinates of intersections
In axis environment I have a curve and a line intersecting it. How can I get components of intersection-1, intersection-2 etc. in axis units?
\documentclass{minimal}
\usepackage{pgfplots}
...
3
votes
1answer
432 views
import input pgfplots with relative paths
The package import makes it posible to \input (and \include) a .tex document which itself \input (or \includegraphics etc.) stuff using relative paths. I was hoping that this also would work with the ...
7
votes
1answer
980 views
Stacked barplots and text labels in x-coordinate
I was trying to stack a groupplot, or was it grouping a stacked plot? However I was trying to get something like:
With Excel it didn't seem to be a problem but when I tried adapting it with pgfplots ...
7
votes
1answer
339 views
Disable warning messages in pgfplots
When I plot a graph with pgfplots sometimes I got such warning message
NOTE: coordinate (500,0) has been dropped because of the y-coordinate filter.
However in may case such points are legal. How ...
6
votes
1answer
773 views
pgfplot consistent number format
I am trying to make a the number format in my pgfplots the same, as in the rest of my document. I am normally using the \num from the siunitx package to typeset numbers, and would like to use it in my ...
5
votes
1answer
1k views
pgfplots ticklabel format logarithmic scale
How do I disable exponent notation on logarithmic scale?
I want ...,$10^0$,$10^1$,$10^2$,... replaced by ...,1,10,100,...
I have tried to play with this default(pgfplots manual p. 209):
...
14
votes
4answers
1k views
Plotting the solution of inequalities with WolframAlpha or Maple
I want to plot the solution of two inequalities and include them in a LaTeX paper.
I really like they way this looks: Wolfram Alpha. Unfortunately, I have no idea how to
export this into a ...
8
votes
1answer
727 views
Contour plot labeling applied to ordinary 2D plots
I was trying to obtain the effect that I manually created below,shown with the letter n. Now, I know that this is customary to do in contour plots, hence I've checked the manual and saw that it is ...
7
votes
2answers
612 views
pgfplots: legendentrys are wrong
I'm using pgfplots to plot a lot of data as you can see below. For some of the plots I'v specified a legendentry, but the marks for these plots are not shown in the legend. does anyone know where the ...
10
votes
1answer
2k views
colors and legend in groupplots
In order to create a nice plot for the comparison of three different sites I'm using the groupplot command. Now for every site I have seven different criterias to compare. So far the plot looks like
...
4
votes
2answers
1k views
pgfplots multiple plots in one file
In pgfplots is it possible to have several plots in one datafile?
The goal is to add about 20 plots, which has different number of points and not the same x-value, to the same axis. (app. 350 points)
...
7
votes
2answers
294 views
Axis background has missing draw/stroke
I want to draw a rectangle around an axis created using pgfplots. This is a minimal example:
\documentclass{minimal}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
...
1
vote
1answer
197 views
pgfplots: externalization and ifthen
I use pgfplots with externalization. When I try to include a macro that uses \ifthenelse, always the 'else' statement is being executed. When I switch off externalization, it works again. See this ...
8
votes
1answer
1k views
pgfplots: externalization and legend referencing
There are some issues when using the pgfplots option legend to name together with externalization. When I disable externalization, everything works fine. When I enable externalization, I get an error
...
4
votes
1answer
688 views
pgfplots: nodes near coords only for one plot
Does anyone know how to set up pgfplots to print nodes only for one and not for all plots?
For example, in 1 I would like to see the nodes only for the test-plot and not for the trend-plot. You will ...
2
votes
1answer
395 views
pgfplots hand-made legend (\label + \ref) fails with custom styles
In pgfplots, when I use a custom style to plot a line, \label the line and then \ref to this plot, I am unable to get the desired result.
The desired result would be to get a little line where I am ...
7
votes
1answer
187 views
Using \ref in a ylabel of a pgfplot
When I use \label and \ref to distinguish two y axes the marks drawn by \ref are no longer on the lines after rotating it together with the rest of the label (see example below). Any ideas?
...
3
votes
2answers
355 views
title of sub plots with ybar groupplots
I tried to use groupplots to arrange several bar plots but the titles are drawn on top of the axis labels of the plot above. Am I doing something wrong here?
\documentclass{article}
...
2
votes
0answers
612 views
pgfplots - subplots with common legend [closed]
This is a followup question of this one. It uses the same MWE but about a different issue so a separate it here. I used Tikz node to create the custom legend but used absolute positioning to place it ...
3
votes
1answer
644 views
pgfplots, custom legend and tikz library external
I try to create Tikz figure with several pgfplots subplots. I want to have one legend for them since they all have the same curves. I found out from this question that i can label and than reference ...
3
votes
1answer
462 views
Strange behavior in smooth pgfplot with sudden changes in the slope
I'm trying to plot some points with sudden changes in the slope. But I get some strange behavior like this:
as you can see in the peaks, there is no smoothness in there.
However, I think the ...
4
votes
2answers
1k views
xlabel on top axis in pgfplots
I managed to get the x tick labels on the top axis of a plot, but the label of the x axis is still on the bottom axis.
I couldn't find an option to get it to the top axis. Is this possible?
Minimal ...
15
votes
3answers
3k views
Aligning subplots in a pgfplots figure
I have the following figure (a very, very stripped down version of a figure I created using matlab2tikz)
My problem is that the subplots are not aligned correctly due to the fact that the y axis ...
4
votes
2answers
915 views
pgfplots: Numbers along the x-axis
I'm trying to recreate some Chromatograms (have the tab-separated data) but I need to get numbers along the x-axis with some vertical separation (lines/boxes) as can be seen below
The image was ...
27
votes
3answers
4k views
pgfplots: how can I scale to text width?
This question led to a new package:
tikzscale
When I try to scale a plot with: width=\textwidth there is some horizontal space between the
start/end of the plot and the start/end of the ...
8
votes
1answer
1k views
pgfplots and calculations; without fpu 'dimension too large', with fpu 'Illegal unit of measure (pt inserted)'
I'm trying to multiply some numbers that will end up in the legend of a plot. I can't get it to work:
If I naively try \pgfmathmultiply, I get a dimension too large error, with the code in MWE 1 ...
4
votes
3answers
1k views
Axis limits in user-defined style
(related but unequal question: Using Macro Defined Lists in TikZ/PGFplots)
I'm having several axis-environments inside the same tikzpicture. I would like to have some (but not all) share the same ...
7
votes
3answers
304 views
Which plotting tool is more likely to stay stable in the basics: MetaPost, PStricks or pgfplots?
I have been looking at the three (major ?) tools---MetaPost, PStricks or pgfplots for plotting data together with LaTeX. My experience is this:
MetaPost code can demand lots of lines for simple ...
7
votes
1answer
1k views
Center nodes near coords in a stacked ybar plot
I'm trying to center the node values, at the middle of each bar, in a stacked plot. However I can only put those nodes in the top of each bar. Is it possible to move those down? To the center of each ...
13
votes
1answer
1k views
geographic maps with TikZ/pgfplots
I have recently discovered pgfplots and I love it. I'm converting the figures from my thesis to pgfplots, or at least the ones I have made myself. One of my figures is a map that I created using the ...
6
votes
1answer
562 views
pgfplots ticks are not applied
I am trying to create a 3D plot with custom z-ticks. However I can not create them with starting negative number. It works however as expected when the ticks start at 0.
My code is this one
...
1
vote
1answer
209 views
Use pgfplots and a custom length to define global width when inputing the plot
I'm trying to set the width for all my plots, that are defined in other files and imported into the main document, using a custom width, \sz. I'm trying to set this length because I want to change it ...
3
votes
1answer
1k views
PGFPLOTS: figure and table formatting
Just after an hour spending browsing through the pgfplots manual, I am trying to have a figure and a table side by side (both the figure and the table use the same data). So I still have lot to learn!
...
7
votes
1answer
2k views
pgfplot: accuracy of tick labels
the y-axis of my diagram uses small numbers like 0,005. I don't want to use a multiplier like 10^-3 which appears by default. If I remove it with
scaled x ticks = false,
x tick label ...
3
votes
1answer
456 views
multiline coords
I'm using \symbolic y coords in a xbar-plot.
some of these coords are (like "jährlicher Primärenergieverbrauch") very long.
so my questions are:
how do I generate line breaks in coords?
is there a ...
7
votes
1answer
923 views
pgfplots from file: search path, looking for \graphicspath equivalent
I have recently discovered the wonderful pgfplots package and I've started coding my Python code to output tabular data of whatever is plotted (at least for simple plots).
In my LaTeX source code, I ...
3
votes
1answer
959 views
PGFPlots: Axis dashed
How to configure axis dashed on PGFPlots?
\begin{axis}[grid=major]
%need grid=dashed
\end{axis}
3
votes
2answers
1k views
Bar plot labels and grids
\documentclass[a4paper,11pt]{report}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
title = {Optimalization based upon co-occurences},
...
6
votes
2answers
1k views
Proper way to change axis in plot tikz
I am trying to reconstruct the image below in tikz, and I think I have done a fairly decent job.
The problem is that my code is a mess. Is there any simple clean way to produce this image?
My ...