Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
106 views

Plotting the graph of a integral function [duplicate]

I would like to know how I can plot the graph of the following function in Latex or Tikz. $f(t)=\frac{\int_{-\infty}^{t}\alpha(s)ds}{\int_{-2}^{-1}\alpha(s)ds}$, where $\alpha: \mathbb{R} \...
3
votes
1answer
599 views

Algebraic curves in TikZ or Asymptote

I want to draw algebraic curves in asymptote, but I do not know how this works. Has anyone an example? If we want to plot for example k[x,y]/\langle x^2+y^2-1\rangle, where can I input the equation ...
1
vote
1answer
303 views

Plot bar graph using table data

I am trying to plot this kind of graph using pgfplots here is my code: it is showing error pls help me \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=Year, ...
6
votes
3answers
388 views

Why must the independent variable of a function to be plotted be a macro in TikZ?

Consider the following code (taken from Jake's answer) and focus on the variable of the function to be plotted. \documentclass[border=5pt,tikz]{standalone} \begin{document} \begin{tikzpicture} \...
21
votes
8answers
2k 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 (...
3
votes
1answer
445 views

Pgfplots: One Colorbar, two scales

Is it possible for one colorbar to have two different scales? Like mentioned in this question: Matlab colorbar with two axes? I'm trying to include two heatmaps with a colorbar in the center. As both ...
8
votes
3answers
593 views

Draw curve in same curve small

I want two make same space between two smooth curves \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (O) at (0,0); \draw [...
6
votes
3answers
2k views

Plot an elliptic curve in Latex

I am trying to plot the elliptic curve secp256k1 y^2=x^3+7 in my latex-document. \begin{center} \begin{tikzpicture}[domain=-4:4, samples at ={-1.769292354238631, -1.76, -1.74, ..., 2.26, 2.35, 2.7, 2....
8
votes
2answers
1k views

Plot y^2=x^3+7 in Latex

My question refers to this post: Plot an elliptic curve in Latex I hope it is not too similar, but the answers in this questions did not work for me. I am trying to plot this in Latex But when I try ...
1
vote
1answer
161 views

Connecting pairs of points from separate plots

I have two scatter plots coming from one single csv file. no,id,x,y,x_proj,y_proj 1,1,565,417,565.6,393.3 1,2,315,234,334.8,193 1,3,949,355,944.8,346.3 I would like to link each point that has the ...
14
votes
3answers
4k views

Floor function plot with TikZ

I can't seem to figure out why, but TikZ isn't properly plotting the floor function. Here is my code: \begin{tikzpicture}[xscale=1,yscale=1] \draw[step=.5cm,gray,very thin] (0,0) grid (8,8); \draw[...
29
votes
4answers
68k views

draw a plot with point

I try to draw something like this: To do that, I have written some code using TikZ, unfortunately I don't get what I want. \documentclass{report} \usepackage{tikz} \usetikzlibrary{automata,topaths}...
1
vote
2answers
307 views

Drawing plane distribution in 3D

I would like to draw a plane distribution with TikZ. Here is how it should look like: I know how to draw a plane with the coordinate axis, but don't know how to draw planes depending on the base-...
0
votes
1answer
99 views

“Waved lines” on a 2D coordinate system [duplicate]

Good evening everyone. I have this code that I slightly need to modify to make the "wave curves" as showed in photo I attach here. \documentclass{article} \usepackage{tikz} \begin{document} \begin{...
6
votes
2answers
939 views

XYZ Coordinate System Drawing

I am beginner and I'd like to know if it is possible to recreate this image in Latex. I've tried to find some examples to help me, but I didn't succeed. Thanks in advance
1
vote
0answers
1k views

Vertical bar chart with different colors for each bar [duplicate]

I'd like to create vertical bar chart with different color for each bar (each bar represents different landuse) my current output is I have alerady tried adding each bar as a different plot, but ...
0
votes
0answers
292 views

How to plot linear histograms with Latex? [duplicate]

I have been reviewing how to plot a line histogram on data of my results. I have searched and only see how to plot in bar histogram, but I have not seen any construction of one of lines in latex. I ...
2
votes
3answers
584 views

Plotted line in tikz stops in middle of grid

The plotted line stops and doesn't go on till the border of the grid: This is my code: \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \begin{document} \begin{tikzpicture}[baseline=...
1
vote
2answers
298 views

Multiple Plot query under a same caption with different labales problem [closed]

I have 6 figures and I want to plot them under a same caption with different labels. I have tried two codes for plotting but they are not working. Codes: \begin{figure}[htp] \centering \...
2
votes
1answer
715 views

tick mark/range problem on graph generated using TikZ

I'm having a little difficulty getting a tick mark on a graph generated using TikZ to appear correctly. The code is below and the problem can be seen in the vertical axis of the second graph (b). How ...
1
vote
0answers
212 views

pgf file overlap in labels of bar chart

I am trying to import a bar chart I created using python and Matplotlib into my LaTeX document. However when I save the chart as a pgf file and import it into my document there is always a slight ...
0
votes
1answer
79 views

tikz Graph scaled to point

I had a graph, that I remember working fine in the past, and suddenly I noticed, that everything is scaled to a tiny point at the bottom of the y-axis. I am not sure if anything at all changed and ...
24
votes
1answer
767 views

How to color a girl's skin

My usual what-can-I-plot-today resulted in this: It's based on the math function by mikuszefski posted on mathematica.stackexchange.com. I implemented it in TeX with pgfplots this way: \...
5
votes
2answers
524 views

how to plot multiplication of two functions in latex

I'm new to latex and am trying to plot f(x)=sqrt{2/pi}*exp{-x^2/2} I managed to plot the exponential part easily but when I multiply it by the square root 4 errors occur. This is my code: \...
-1
votes
1answer
114 views

Wrong height in TIKZ diagram

I have the following: \begin{tikzpicture} \def\xmax{110} \def\ymax{1} \def\q{10} % Normalization \def\ha{101} \def\hb{210} \def\hc{340} \def\hd{553} \def\he{701} \def\hf{998} \...
0
votes
1answer
66 views

wrong picture from tkz plot

I cannot found my error. I tried to draw a function, but Latex makes an error. Here the code: \documentclass[a4paper,11pt]{article} \usepackage{tikz, tkz-euclide} \usetikzlibrary{calc,intersections,...
1
vote
1answer
294 views

How do I plot multiple iterative functions (or recursive sequences) on one graph with TikZ? [closed]

I'm trying to plot several (4) numerical sequences in TikZ. Each of these sequences should be obtained by iterating the following function, a*x*(1-x) where a is a parameter that varies across the ...
1
vote
1answer
335 views

Shift plot in pgfplot

I want to represent the plot for an isothermal ideal gas transformation. I tried the following: \begin{tikzpicture} \begin{axis}[ axis lines = left, xlabel = $V$, ylabel = {$p$}, ] \...
0
votes
1answer
104 views

How can I make a graph of this function?

I need to draw the function f(x) = -5/16x^4 + 3/4x^3 + 1, and I have no clue how to do that. I've done something similar to what I need like this: \draw[thick,color=blue] plot[samples=50, domain=-1....
8
votes
2answers
8k 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 main ...
12
votes
1answer
2k 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 ...
8
votes
2answers
3k views

Fill area of curve above a line using pgfplots

This question is related to Fill between two curves in pgfplots. which started me of. However, I need to have just the area above the reference line filled. \begin{tikzpicture} \pgfplotstableread{...
1
vote
1answer
225 views

How can I plot the value in the table?

This is my work so far. %% document class \documentclass[a4paper]{article} %% packages % ----- Preamble ---------- % \usepackage[margin=1.5cm,top=1.2cm]{geometry} % géométrie de la page. \...
4
votes
1answer
777 views

Pgfplots: Generate points randomly

I have a very simple pgf plot, like this: \pgfmathdeclarefunction{gauss}{2}{% \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}% } \begin{tikzpicture} \begin{axis}[ height=4cm, ...
20
votes
1answer
2k views

Drawing timeline

I have a dataset which consists of repeating events over time. Each event takes an arbitrary amount of time. I could plot this using gnuplot but am unable to produce correct keys because of the ...
22
votes
2answers
6k views

Animated plotting with LaTex?

I am not a LaTeX pro, that's why I don't know if the following is possible and how I could do it. I have a graphic (a plot, jpg) and it shows a time series. I know in PowerPoint it is possible that ...
3
votes
3answers
1k views

Hysteresis Loop

I am new to latex. I'm doing my MA thesis on Magnetic Materials. I don't know how to draw this diagram in LaTeX. I would be grateful if you can help me with this image. Thanks.
7
votes
1answer
2k views

plotting the sequence x_n using tikz

I want to plot the sequence x_1 = \sin(pi root(2)) x_2 = \sin(pi root(6)) x_3 = \sin(pi root(12)) In short my x_n = sin( pi root(n^2 + n)). I want to plot this as an animation as n goes to infinity....
3
votes
0answers
128 views

Conditional plotting with quiver

I am trying to plot two vector fields (x,y) and (-y,x) on a manifold where the norm is given by $x^2 - y^2$ instead of $x^2 + y^2$. Furthermore, I want the vector fields to be only plotted if x>y. ...
6
votes
1answer
461 views

How to create a Ricker Wavelet in TikZ

Is there an easy way to create this wavelet in TikZ. Following the formula I have which is (1-2pi(x)^2)(e^-pi(x)^2) but when trying to create this I arrived at the issue that the function I have ...
1
vote
1answer
58 views

PGF Plots stacked bar weird behavior

I have a problem with the following pgfPlot, after changing some of the values, it's left padding is gone (see image) - does anyone have an idea why? I have tried changing xtick, changed some values, ...
3
votes
1answer
995 views

pgfplots: Use strings as barchart labels from .csv

I'm trying to plot a vertical bar chart using pfgplots that has strings as labels for the bar charts. (This question has been asked before, but I'm hoping there is a cleaner way to do this now. ...
5
votes
3answers
1k views

Plot bessel functions

Is there any way of producing first and second kind bessel functions? What about modified bessel functions? I want to have J_{\nu} (x) , Y_{\nu} (x), I_{\nu} (x) and K_{\nu} (x) in a separate ...
1
vote
1answer
338 views

Background fill with pgfplots inset

I am trying to add an inset to a plot. I used this answer as a guide to get started, but the inset plot is transparent. Adding axis background/.style={fill=white} to the inset plot fixes the ...
0
votes
1answer
156 views

Depicting a .dat file into a contour plot in Latex [closed]

I have prepared a .dat file containing some numerical information of probability related a specific radial function. I want to depict these information in a contour plot like the attached figure. The ...
3
votes
3answers
149 views

Dot in Range Box Plot

I'm attempting to make a table that visually mimics the WSJ markets page. Specifically, I'm hoping that there's a simple way to implement the visual from the Range column: It seems plausible to me ...
3
votes
1answer
116 views

Swap colors of plots

I want to swap two plot colors in my figure. Please take a look at this: As you can see, the "short-run" graph is omitted in the second figure. Thus, in order to reduce confusions when studying the ...
1
vote
0answers
267 views

Adjusting bar plot (y limits) and error bars [closed]

I've some problems adjusting the y limits to include the error bars and zero on the y-axis in the following code: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \...
0
votes
2answers
133 views

web based solution for create plot from LaTeX

We know there are some solutions for rendering LaTeX mathematical content on the web, for example MathJax. Is there a similar (free) way to create plot for mathematical formula which is written as ...
0
votes
1answer
82 views

Pgfplot restricts x domain's to y's. Plot looks weird

I am trying to plot a basic 2D graph of small floating point numbers (0:0.12) against a set of large intergers (100:100000) like so: \begin{tikzpicture} \begin{axis}[ domain=100:100000, title=...