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.

Filter by
Sorted by
Tagged with
0
votes
0answers
25 views

pdflatex hangs when compiling some pdf files [closed]

I'm using TeXstudio an a Mac and have found that some pgf files (obtained from python's Matplotlib), cause the compilation to hang. Also, when I run pdflatex from the terminal, it hangs on: [13] (./...
1
vote
1answer
37 views

How to change a specific set of axis ticks to be “on top” without changing axis or grid lines (pgfplots)?

I have drawn a Cartesian coordinate plane with pgfplots, and added a line y = 1 in red. not zoomedexample of output zoomedexample of output The y-axis tick at y = 1 is covered up by the red line. I ...
0
votes
2answers
83 views

How to draw parametric curve in TikZ deltoid and astroid?

Without using MATLAB, Python or any vector graphic language, is it possible to draw the parametric curves deltoid (a/b = 3) and astroid (a/b = 4) using TikZ? \begin{tikzpicture} \draw (0,0) circle [...
5
votes
3answers
77 views

How to get consistent arrow tips in TikZ and pgfplots?

I want to get consistent arrow tips for Arrows in TikZ drawings pgfplots axes Arrows used to annotate features in plots produced with pgfplots My solution works only for 1 and 3, as demonstrated by ...
1
vote
1answer
44 views

Why does TikZ arrow style not work in pgplots?

Based on this question, I defined my own arrow style in TikZ and expected it to work in pgfplots: \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{arrows.meta} \pgfplotsset{compat=...
2
votes
1answer
30 views

Portfolio frontier with Pgfplots package

I'm currently trying to plot the portfolio frontier given a data set, but the hyperbola is not very pretty.. With the data I've calculated the following analytical expressions for the frontier: Upper ...
0
votes
1answer
55 views

What's wrong in my TikZ?

When I try to generate a PDF, my program give me errors. \begin{tikzpicture} \begin{axis}[ axis lines=middle, xlabel=$X$, ylabel=$Y$, domain=2.25:5.75, xmin=2.25, xmax=5.75, ymin=-1.5, ymax=1.5, ...
0
votes
0answers
39 views

Problems with position of vertical line

I struggle with the alignment of a vertical line, which should act as an x axis break. The MWE looks like this: \documentclass[border=5pt, tikz]{standalone} \usepackage{pgfplots} \usepackage{...
4
votes
0answers
72 views

tikz-3d/pgfplots: How to draw/plot curved spacetime?

Since I try to write a short introduction to tensors for physics students, I mentioned the Einstein's field equations (as a motivation). Therefore, I wanted to create a tikzpicture/pgfplots of curved ...
0
votes
1answer
23 views

How to adjust domain values in pgfplots

I am trying to generate the slope field of dy/dx = (x-1)*(y+2)/3 to illustrate that along the lines x=1 and y=-2, the slope of the solutions curve is zero, indicated by horizontal lineal elements. ...
4
votes
0answers
38 views

How to center standalone pgsplots by the y-axis?

I have a standalone document that contains two plots. See MWE: \documentclass[tikz]{standalone} % PACKAGES LOADING \usepackage{pgfplots} % To draw plots. % TIKZ & PGFPLOTS LIBRARIES & ...
2
votes
1answer
91 views

A circle with parametric shading

How can I produce a circle with parametric color shading, such as in the following example? The parameter here is the angle $-\pi \le \theta \pi$ which varies through the rainbow colors.
1
vote
2answers
78 views

I need to copy this function in my document. Sadly I do not know it's function, is there any way to copy it with pgfplots?

% I tried using cosinus because it shows what I need to show, but im really not getting anywhere at this point. \documentclass[a4paper,10pt]{article} \usepackage{tikz} \usepackage{pgfplots} \...
0
votes
0answers
41 views

Multidimensional Parallel Coordinates Plot in LaTex

I'm new to LaTex and trying to import Parallel Coordinates Plots which I created in Matlab. There are up to 16 variables and 1000 data entries. Also I need different plots with different variables. I ...
1
vote
1answer
32 views

pgf: “Dimension too large” in a function which fits into a graph, /pgf/fpu=true does not help

I want to plot a lognormal function: \documentclass{article} \usepackage{pgfplots} \begin{document} \pgfmathdeclarefunction{lognormal}{2}{% % \pgfkeys{/pgf/fpu=true} \pgfmathparse{1/(x*#2*sqrt(...
1
vote
1answer
46 views

general question about custom colormaps

I am wondering if there is the possibility in pgfplots to define a color according to the value of the data, which should be plotted? What I am thinking of is to define individual colors for all ...
1
vote
2answers
40 views

How to plot by altering the signs of a data in LaTeX for plotting data?

I am trying to plot the data by altering the signs of orginal data for both X-Axis and Y-Axis columns data, How do i proceed to get this, i have large data so could write, so i minimize my problem. ...
-1
votes
0answers
42 views

Complex plane partition [closed]

I am new to using tiks and pgf plots packages and please require the code for this diagram.
2
votes
2answers
116 views

How to plot the following graph using TikZ?

I am trying to plot the curve and the shaded area shown in the screenshot below. I do not have the expression for the curve, but I was thinking about maybe using some kind of interpolating curve to ...
0
votes
1answer
62 views

TikZ Double Sideband (DSB) Spectrum

I am trying to draw the spectrum of a DSB (suppressed carrier) spectrum in TikZ like the attached image, or almost like it. My modest code below is far away. I appreciate the help in bridging the gap....
0
votes
0answers
33 views

Drawing a specific graph with Pgfplots

I've been working on this graph for some time now and I need help. I hope someone in here is way better than me at Latex (I know you are :)). The graph I'm working on should look like this.
0
votes
1answer
15 views

Saving Custom Cycle List with cycle multiindex* list

I'd like to save a cycle list in PGFPlots that I have defined using cycle multiindex* list. See MWE below. When I try to do this though I just get black lines in my plot. How can I save my custom list ...
0
votes
0answers
33 views

PGF interpolated shading from data

Here is the following MWE for a plot with two curves: \documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat = 1.12} \begin{document} \begin{tikzpicture} \pgfplotsset{ set ...
2
votes
0answers
61 views

How do I crop a 3D surface in pgfplots?

I am attempting to reproduce the following graph using pgfplots: Here is the MWE code I developed, along with the corresponding plot generated: \documentclass{article} \usepackage[utf8]{inputenc} \...
2
votes
1answer
47 views

uniform colormap

I plot the contour of an exemplary xyz matrix. \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \usepackage{filecontents} \pgfplotsset{compat=newest} \usepgfplotslibrary{colormaps} \...
1
vote
1answer
21 views

Chart Label in two lines

I created the chart below and would like to change the ylabel "Fusionierte Theater" two have each word in one line. Is that possible? I would also like to get "Anstalt" "...
1
vote
1answer
49 views

Persistent errors with pgfplots bar graphs

I've been trying to figure out what's wrong with my code, I'm trying to make a bar chart with the data below (+ code). Some of the outputs include: Overfull \vbox (10.22557pt too high) has occurred ...
0
votes
1answer
36 views

Corner plots with latex / tikz / pgplots

I want to create corner plots like these ones: https://i.stack.imgur.com/c21Pt.png https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/49567/versions/6/screenshot.png http://...
2
votes
2answers
48 views

Draw a point with a label in a defined function PGF Plots

i would like to plot a function with PGF and also plot some points that belong to a function with a label. I defined the function and plotted it with this code: \begin{tikzpicture} [declare function = ...
0
votes
0answers
45 views

Self Learning (pgfplots, asymptote) in systematic manner from ab initio

Kindly guide in order to self learn in a systematic manner the following Pgfplots Asymptote for 2D and 3D drawings. Thanks
0
votes
1answer
28 views

Plot Totcounter-Value

I'm trying to get tikzpicture and pgfplots working with totcount to create the following bars. I count all occurrences of the different ratings with \totcounter and in text I am able to read the ...
0
votes
1answer
70 views

problems with pgfplots contour gnuplot

I tried to plot the contour of a xyz matrix using pgfplots contour gnuplot, but got the error message from the .log data (My data is in the test pic.tex file) Package pgfplots notification 'compat/...
0
votes
0answers
15 views

How do I shade this area using pgfplots? [duplicate]

Hello I am new to Latex and I was wondering how I can shade in the area that I have coloured in green? I would also like to make all the points surrounding it the same colour. I have attached my code ...
0
votes
0answers
26 views

Creating a heatmap from CSV data [duplicate]

This questions solves the same problem I have, but in the example the data comes from filecontents and the solution involves changing the data, in my case the data comes from a CSV which I cannot ...
0
votes
1answer
40 views

How to make values of an axis show clearly in pgf plots?

I have the following LaTeX code I wrote: \begin{tikzpicture} \begin{axis}[ title={Execution Time Using Varying Array Sizes }, xlabel={Array Length}, ylabel={Execution Time [milliseconds]}, ...
1
vote
0answers
17 views

LaTeX commands in pgfplots legend entries from csv import

I am trying to import data from a csv file, where legend entries are automatically taken from the csv file's header. Those legend entries contain LaTeX math code. % used PGFPlots v1.16 \documentclass[...
2
votes
1answer
31 views

How do I make labels on a node smaller (pgfplots)

I want to make the nodes in the graph (below) have smaller labels (i.e smaller font) because currently my graph, when compiled, makes all the nodes collide with each other. How do I do this? \begin{...
1
vote
1answer
66 views

X-axis discontinuity for plot with two ordinate axes - not in pgfplots manual

Despite multiple ordinates and axes discontinuities appearing adjacent in the pgfplots manual, achieving both in the same plot is proving difficult. Specifically, I have the following pgfplots plot ...
1
vote
0answers
49 views

How to access current plot color in pgfplots

I'm looking for a way to access the current plot index of pgfplots in order for a subsequent draw command to use that plots color. \documentclass[]{standalone} \usepackage{% tikz,% pgfplots,% } \...
0
votes
0answers
29 views

Unregular plot using latex [duplicate]

Is there a way tp produce a similar plot in latex
0
votes
2answers
59 views

Aligning multiple figures

I am trying to align multiple tikzpictures. It gets complicated as I need the following figures to be aligned possibly two y-axis possibly legends captions The pgfplots manual gives 3 possible ...
4
votes
1answer
33 views

Pgfplot and sampling at specific points

I am trying to understand how to use the samples at option with ... from pgfplots. Consider the MWE \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \...
-2
votes
0answers
33 views

how can make a graphics with pgf-plot [duplicate]

help me please: how can I plot and get a pgf-plot loading a .txt data file, How can I load the file.txt without getting an error?
0
votes
1answer
34 views

pgf error maths

help me please: I don't understand why pgf show me this error, for all my dates: Package PGF Math Error: Could not parse input '14.099117,3.068e+6,' as a floating point number, sorry. The unreadable ...
4
votes
3answers
297 views

Plot with cube root in tikz

I would like to use only the tikz and pgfplots package to graph the function $f(x)=\sqrt[3]{(x^{3}-x^{2})}$. How should I proceed? Does the code below not compile? \documentclass{standalone} \...
0
votes
0answers
17 views

I am interested to make a quiver plot (with color map) from a .txt file on LaTeX. I could really use some help!

\documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[title=Quiver and plot table] \addplot[blue, quiver={u=\thisrow{u},v=\thisrow{v}}, -stealth] table { x y ...
1
vote
1answer
33 views

How to make the graph window larger?

I am creating a tikz graph and the values are very small. For some reason, if I make the width larger than 4cm on each side, the code will not execute. I am trying to fit it to the page. Here is my ...
1
vote
0answers
31 views

Figures generated with pgfplots and includestandalone do not have the same size, even though the scaling is equal

In my project I have several graphs/figures displaying data. The requirements I got are to use the same font in the text of the main document and in all figures. Therefore, I decided to use pgfplots/...
0
votes
0answers
18 views

Set labelsize of tikz/pgfplots-figure to fixed font size independently of scaling factor

In my project I have several graphs/figures displaying data. The requirements I got are to use the same font in the text of the main document and in all figures. Therefore, I decided to use pgfplots/...
1
vote
1answer
32 views

Alignment and centering of pgfplots

I have two problems. I have four pgfplots and I want to align the x-axes of the plots in the same rows, also align the y-axes of the plots on the same columns. I'd like to insert a math symbol \...

1
2 3 4 5
164