Questions tagged [plot]
{plot} is for questions concerned with plotting data or functions using TeX. For questions specific to the pgfplots package, use the {pgfplots} tag.
257 questions
346
votes
4
answers
51k
views
Create xkcd style diagram in TeX
The unique style of the diagrams at xkcd has an informative but nice hand-drawn touch. I guess they are actually drawn by hand but just recently on our partner site for Mathematica someone asked how ...
12
votes
6
answers
4k
views
Plotting the Cantor function
I would like to know if there is an (easy?) way of plotting the Cantor function (devil's staircase) using LaTeX.
Doing it manually with TikZ seems like madness somehow and my knowledge of plotting ...
55
votes
1
answer
33k
views
Bell Curve/Gaussian Function/Normal Distribution in TikZ/PGF
Can anyone tell me how to plot a gaussian function/bell curve using TikZ/PGF? I'm basically looking to implement something like PSTricks's \psGauss command.
46
votes
4
answers
34k
views
Fill the area between two curves calculated by pgfplots
This is essentially the same question as fill the area between two curves when their coordinates are known.
In that question, the curves were defined by known coordinates. I want to fill the area ...
70
votes
5
answers
132k
views
How to plot data from a CSV file using tikz and csvsimple?
Here is a minimal example :
\begin{filecontents*}{data.csv}
a,b,c,d
1,4,5,1
2,3,1,5
3,5,6,1
4,1,4,9
5,3,4,7
\end{filecontents*}
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{...
12
votes
2
answers
7k
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 ...
24
votes
1
answer
8k
views
Plotting an implicit function using pgfplots
What is the correct way to plot an implicit function using pgfplots? Consider the following example:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\...
32
votes
8
answers
7k
views
What are the benefits of PGFPlots/TikZ compared to importing PDF?
What are the benefits of using tools like pgfplots or tikz directly in LaTeX compared to importing PDF/PGF generated by say matplotlib?
This answer believed that the main reason is to match the plots ...
30
votes
2
answers
11k
views
Is plotting exponential graphs a known source of bugs in TikZ?
I want to plot $y = 2^x$ over a small domain. Unfortunately, even though tikz (v 2.1) seems to be able to calculate 2^{negative numbers} it is not plotting them correctly.
My minimal example is:
\...
28
votes
2
answers
10k
views
Fill between two curves in pgfplots.
How to accomplish fill between two curves in pgfplots? For example, I have
...
\addplot coordinates {(0,1) (1,1)};
\addplot file {something.dat};
...
and I would like to have filling between those ...
18
votes
8
answers
20k
views
How to plot x^(1/3)?
I tried to export my Geogebra graphs into tikz-code. In General it works fine, but plot x^1/3 doesn't work:
\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\pagestyle{...
22
votes
8
answers
4k
views
Plotting Weierstrass function
I'm trying to plot Weierstrass function using only basic TikZ picture functionality (no gnuplot or whatnot). How do I use sum in a \draw? Do I have to make a new command? Use a loop?
An alternative (...
4
votes
1
answer
1k
views
Remove duplicate labels with symbolic y coords [duplicate]
I am new to pgfplots and have a problem with the following example:
\begin{tikzpicture}
\begin{axis}[title = Some fancy benchmark data,
xbar,
y axis line style = { opacity = 0 },
axis ...
14
votes
1
answer
4k
views
Pgfplots: plot graph inside table
I would like to plot a table with a graph inside it. I am trying to use this example as a guide. This is the current hand-constructed version.
UPDATE: I don't have enough reputation to answer my own ...
12
votes
3
answers
8k
views
Create heatmap with PSTricks or TikZ
I have a huge amount of 2D-coordinates, associated with a value, e.g.:
x | y | value
27.50 52.15 12.51
61.83 13.32 57.56
36.23 21.83 41.73
40.46 85.67 25.20
...
The data is ...