Skip to main content

Questions tagged [pgfplots]

{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.

608 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8 votes
0 answers
260 views

Is there a bug with the `ybar interval stacked` key of pgfplots?

The ybar interval key is used to place the graph bars between the given coordinates. The next 5 coordinates define 4 intervals. This key works as expected and produces the following result. \...
AndréC's user avatar
  • 25.6k
7 votes
0 answers
841 views

Automatically externalizing content of a PGFplot as a PNG

I've got basically the same issue as in this question: I have a rather complicated plot made with PGFplots and I can get a very significant file size reduction by using a rasterized image (PNG) ...
David Z's user avatar
  • 12.2k
7 votes
0 answers
684 views

A problem with pgfplots and coordinates

I'm using Jake's code in his answer to How can I automatically mark local extrema with pgfplots and scatter?. Using the mark max style I can retrieve the value for the y-coordinate of the maximum for ...
Gonzalo Medina's user avatar
7 votes
0 answers
435 views

Custom column intervals in a PGFPlots histogram

Is is possible to give columns in a PGFPlots histogram custom interval of different sizes? Eg. I would like my histogram to have five columns over these intervals: [-100,-50[ [-50,0[ [0,1[ [1,50[ [50,...
Mike Pedersen's user avatar
6 votes
0 answers
831 views

`imshow` like diplay of image with colormap

I would like to show an originally gray scale image with a specific colormap like matlabs/matplotlibs imshow. Original: % python import matplotlib.pyplot as plt import matplotlib.image as mpimg ...
Manuel Schmidt's user avatar
5 votes
0 answers
190 views

Shift scatter plot according to class

I have a scatter plot with many points at the same coordinate. I would like to shift every point belonging to one class a bit on the x-axis, so that they are more easily distinguishable. I've tried to ...
fuj36840's user avatar
  • 550
5 votes
0 answers
197 views

Opacity of plane has no influence on points behind it

I created the following figure of my data points and a regression plane: I would like the data points above the plane to remain black but the data points below the plane to be blue. I thought this ...
Zdenko Heyvaert's user avatar
5 votes
0 answers
232 views

Using pgfplots with raw gnuplot plotting commands, is it possible to reuse tikzpictures?

I have a main.tex in which I import plots as tikzpictures with includegraphics. A typical plot looks like this \begin{tikzpicture} \def \dataFile {'plots/data/sample_data.dat'} \begin{axis} \...
Kappie001's user avatar
  • 225
5 votes
0 answers
722 views

PGFPlots fillbetween layer issue with main layer

I am using fill between to create some diagrams where I need semi-transparent fillings above ploted lines. As normally fillings are put into a separate layer pre main below plot lines, I tried to move ...
bz-mof's user avatar
  • 53
5 votes
0 answers
2k views

Compute convolution of discrete signals in Tikz

I want to draw a simple graphical example of a convolution of two discrete sequences in TikZ. I used the code from this link to get my result, which is already what I want but, so far, the values of ...
gbernardi's user avatar
  • 845
5 votes
0 answers
166 views

Is there a way to automatically force xticks on first and last data point in pgfplots?

I have created a custom pgfplot style which allows me to create line plots with the x axis being a time in hh:mm format. The data is loaded from .csv files. The automatic tick placement on the x axis ...
user avatar
5 votes
0 answers
1k views

How to select a range of data within a .csv file in latex using pgfplots?

I am generating a plot of data using pgfplots in latex. I am using data from several excel files as .csv. Here is the MWE: \documentclass[border=5mm,convert]{standalone} \usepackage{pgfplots} \...
Tim's user avatar
  • 61
5 votes
0 answers
753 views

pgfplots: rotating a shape in 3D independent of the axes

I have a group of shapes I'm plotting in 3D via \addplot3 (such as a cone) and need to have them pointed in a direction specified by the macro arguments. I do not want to just change the view angle or ...
Hanmyo's user avatar
  • 1,203
5 votes
0 answers
2k views

Flip x and y axis of ternary graph

I am trying to reproduce the USDA Soil Triangle. To do so, I would need to flip the x and y axis of the default pgfplots-ternary. I understand, that I could switch my inputs (don't really want to do ...
Raphael's user avatar
  • 308
4 votes
0 answers
594 views

Plotting a 3D graph in Latex

I am trying to change the 2D scatter graph into 3D which can also take the value of the P column as z-axis. But the output I got is not smooth and I really don't understand how I can change it into 3D ...
TaniaMalik's user avatar
4 votes
0 answers
183 views

How to plot measured signals? i.e. large number of points

So far I used TikZ/PFGplots to plot small potions of (simulated) signals, drawing schemes, etc. but when it comes to actually measured signals (e.g. at 10 kHz), you easily end up with millions of ...
Max's user avatar
  • 171
4 votes
0 answers
377 views

pgfplots/Bar Chart: Don't leave room, when value is 0

I've got a bar chart with two main bars (black, x ticks). Each of the two bars is specified by several different sub-bars (filled resp. pattern). As the first bar at x-coordinate 1 is described by ...
TobiTex90's user avatar
4 votes
0 answers
182 views

Pgfplots: fill between let the axis options to be neglected

In the following example, the axis lines should be yellow and ultra thick, but using the fill between instruction let the axis options to be neglected: \documentclass{standalone} \usepackage{pgfplots}...
Luigi's user avatar
  • 6,325
4 votes
0 answers
747 views

reading inline table from macro

For a patch plot I need to read the patch table from a previously defined macro \mytable. However this results in an error: ! Package pgfplots Error: Sorry, the choice 'row sep=crcr' is currently ...
AlexG's user avatar
  • 55.2k
4 votes
0 answers
1k views

Crop z-axis of PGFPlots

I try to implement the following image of the function 1/(x*y) I plotted using WolframAlpha using the PGFPlots package: The function is not defined if x=0 or y=0, so I split it up into four parts ...
Stefan's user avatar
  • 41
4 votes
0 answers
2k views

Groups of boxplots using symbolic coordinates

I would like to create a plot similarly as to the bar plot example, but with boxplots instead of bars. So far what I have this MWE: \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} \...
user77391's user avatar
4 votes
0 answers
1k views

Automatically positioning a legend relative to multiple plots in groupplots

This question deals with centered legend placement in a set of plots aligned with groupplots. However, as the OP stated in a comment, the (accepted) solution requires some hand tweaking. I suspect ...
jja's user avatar
  • 1,813
4 votes
0 answers
871 views

Pgfplots histogram with density less than one

I want to plot two histograms over each other in order to compare densities of two different datasets. The problem is that the second dataset has less observations than the first one, and I want its ...
user3218615's user avatar
4 votes
0 answers
2k views

using gnuplot to plot data from a file

I am trying to plot some data using pgfplots, but the data are so extensive that the maximum capacity is reached. I get the error: TeX capacity exceeded, sorry [main memory size=3000000]. What can I ...
neptunhiker's user avatar
4 votes
0 answers
1k views

How to automatically optimize the PDF output of TiKZ externalize?

I use pgfplots with externalization for generating plots in my document. For heavy plots the output PDF for a figure can grow to few hundred KB. I used Adobe Acrobat to optimize the PDFs which ...
M.Reza's user avatar
  • 3,247
3 votes
0 answers
32 views

How to display y or x axis break with pgfplots?

Looking at this topic (Axis break in pgfplots), I found a way to "break" my x axis on some data I have. However, I am not truly satisfied with the result. Here is a minimal plot of my ...
Adrien Lebeau's user avatar
3 votes
0 answers
55 views

Using an exponential color gradient in tikz for a custom legend

I'm trying to create a plot that is using color as the third dimension. However, I want to create the "axis" of that third dimension exponentially, as most values are quite close to 0. My ...
NoraTheExplorer's user avatar
3 votes
0 answers
51 views

Numerical precision issues within PFGplotstable

I am creating a table which automatically generates outputs of various quantities of interest for compressible flow. The first column contains Mach numbers, which are used to calculate the quantities ...
aeroben's user avatar
  • 31
3 votes
0 answers
68 views

Representation of the three curvatures with respective triangles

I'm trying for the fun to reproduce the following figure in TikZ: So far i have been able to get: but the result i get looks quite bad in my opinion and the way i have started to build the triangles ...
Vincent ISOZ's user avatar
3 votes
0 answers
289 views

Minor ticks in log axis missing

I'm missing some minor y ticks in a logarithmic pgfplots axis: This has been generated with: \begin{tikzpicture} \begin{axis}[ ymode=log, ymax=31, ] \addplot[only marks] coordinates {(0,0....
user avatar
3 votes
0 answers
107 views

How to best produce a nomogram representing an epicyclic geartrain

I have a rather philosophical question. I need to produce several so-called nomograms, they represent the relations of an epicyclic gear train used in automatic gearboxes or for the power split device ...
John W. de Burgh's user avatar
3 votes
0 answers
235 views

Dimension too large for this tikz. How to resolve?

I am using MATLAB to plot some graphs and then using matlab2tikz() to convert these MATLAB graphs to tikz. The issue I have now is that one of the graphs I have after converting it to tikz, failed to ...
B E I R U T's user avatar
3 votes
0 answers
104 views

Dimension too large when using path to include graphics

Im trying to include an image as xy-plane on z=0. See mwe. ymax is supposed to be 1500. But when I change ymax to 1500, the domain, (axis cs:7.5,75,0) coordinate (P) to (axis cs:7.5,750,0) coordinate (...
user239702's user avatar
3 votes
0 answers
209 views

how can I fill an “fill between” area by point meta?

All, consider the following MWE: How to fill the blue!20 area by point meta e.g., point meta=x^2 ? I mean the filling should be like a contourplot, with colors determined by some function (like x^2)...
Lerh's user avatar
  • 75
3 votes
0 answers
206 views

pgfplost: Accuracy of the color gradient in matrix plot

I want to plot a matrix with pgfplots to match the style of the rest of my LaTeX document. The desired output is something like this plot from Mathematica: But when I try to plot this data with ...
enco909's user avatar
  • 56
3 votes
1 answer
627 views

pgfplots : md5 but no pdf

I'm re-opening some documents I worked on 3 years ago. Everything was working fine (set size, colors, text, legend, externalize to pdf, reinput pdf figure to save computation time) I'm using exactly ...
user12377975's user avatar
3 votes
0 answers
102 views

Wrong font scaling using when groupplot, tikzscale and fillbetween, maybe a bug (?)

Situation: I am trying to place one bigger pgfplot at the left side of a figure and four small plots (2x2) on the right half, like this: |--------|----|----| | | P2 | P3 | | plot 1 |----|-...
J. Prass's user avatar
3 votes
0 answers
612 views

PDF version <1.7>, but at most version <1.5> allowed

I used a C++ function my teacher gave us to create some ppm files, which I then converted to the eps format using an online resource for use in my report. However, these images are causing problems. ...
Orion's user avatar
  • 43
3 votes
0 answers
172 views

possible (major) bug with pgfplot axis labeling?

I tried compiling a bunch of files today, all of which use tikzpictures and pgfplots. Something truly odd is happening with how the y-axis label is being positioned. I took the MWE from Positioning ...
Johnny Canuck's user avatar
3 votes
0 answers
123 views

Pgfplots of flow lines of an ode systems

I'd like to have a tikz diagram of the flow lines of this onion shaped flow: x'(t)=-16y y'(t)=(x^2 + y^2 + 4y + 3)(x^2 + y^2 - 4y + 3) in the square -4 < x < 4, -4 < y < 4. These ...
Pietro Majer's user avatar
3 votes
0 answers
103 views

Align pgfplots horizontally

I want to align the pgfplots seen in the picture below. I already tried with \pgfplotsset{yticklabel style={text width=3em,align=right}}, but as you can see, the plots are still not aligned. The ...
wuff1337's user avatar
3 votes
0 answers
130 views

Colormaps within group plots with date coordinates in pgfplots

I am having issues when using colormaps within group plots that have date coordinates in x. \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \usepgfplotslibrary{...
Claudio's user avatar
  • 2,017
3 votes
0 answers
488 views

pgfplots: Best practice to avoid "TeX capacity exceeded" when plotting huge data sets?

I want to create some huge pgfplot with three different axis and a lot of data points. In summary there are 20160 lines of data existent. My problem is: All few hours the values will change ...
Dave's user avatar
  • 3,768
3 votes
0 answers
372 views

Differences between pgfplots and tkz-fct plots

I am trying to choose between pgfplots and tkz-fct for producing beautiful graphs in LaTeX. It seems tkz-fct graphs look better with less effort (fewer lines of code) compared to pgfplots. The ...
EthanAlvaree's user avatar
  • 1,411
3 votes
0 answers
595 views

Tikz multi-bar plot custom bar position

I have a multi-bar plot that contains single and multi bars: I want to make the single bars A and D in the center; right now they are left aligned. The following is the code: \begin{tikzpicture} ...
cagryInside's user avatar
3 votes
0 answers
193 views

One label for each open contour line

I'm trying to set only one label for each contour line, but all the solution for closed contour line failed for open contour lines, like the option label distance=10000pt. How can I do this? \...
Thales Souza Freire's user avatar
3 votes
0 answers
547 views

Is it possible to make pgfplots use 3D spherical coordinates?

I am wondering if one can install 3D spherical coordinates in pgfplots (not TikZ). Questions of this sort have been already asked, but as far as I can see, the answers here, here, here and here all ...
user avatar
3 votes
0 answers
44 views

Scaling the Axis of a pgfplot

So I've been fighting with LaTeX for a while now and haven't really gotten a conclusive answer on how to deal with this issue. I have a plot and this is how my axis looks like. I obviously want to ...
nsnro's user avatar
  • 31
3 votes
0 answers
333 views

pgfplots - filldraw disappears after adding plot

I have some plots in my graph and want to mark a special area with a square. Here's what the plot looks like: \begin{tikzpicture} \begin{axis}[axis lines = left, xlabel = {Player 1}, ylabel = {...
Felix Jassler's user avatar
3 votes
0 answers
541 views

pgfplots, lengths in axis coordinates

Sorry if it's a FAQ, probably looking for the wrong keywords but couldn't find anything. I have a macro that takes a length parameter to draw a shape. I'd like to call this macro inside a pgfplots ...
filippo's user avatar
  • 598

1
2 3 4 5
13