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.

Filter by
Sorted by
Tagged with
19
votes
2answers
317 views

Plot Dini's surface

According to Wikipedia, the Dini's surface is described by the following parametric equations: x = a \cos u \sin v y = a \sin u \sin v z = a (\cos v + \ln\tan v/2) + bu So, I'd like to plot the ...
0
votes
0answers
17 views

pgfplots does not use declared marks at a table plot [duplicate]

I use \pgfdeclareplotmark{mymark} {\shade[draw=none,ball color=green!70] (0pt, 0pt) circle [radius=2pt];} Why has \addplot3 table [only marks, mark=mymark] no effect? What have I to do? \...
2
votes
1answer
49 views

Plotting attenuated wave with tikz

I have the code (generously corrected by the stack) \documentclass[tikz,border=3.14mm]{standalone} \usepackage{tikz-3dplot} \usetikzlibrary{arrows.meta,bending} \usepackage{xparse} \usepackage{tikz} ...
0
votes
1answer
17 views

Scaling a whole plot

Have a plot diagram with x and y axis and i want to scale it such as stratching. How do i do that? \begin{tikzpicture} \begin{axis}[ axis lines = left, xlabel = $x$] %Below the red parabola ...
0
votes
0answers
24 views

Issue with fig=TRUE in Sweave RStudio

I do not receive plots using the fig=TRUE in the chunks. Rather i receive an 'undefined control sequence' error. Consider a simple code \documentclass{article} \usepackage{graphicx} \begin{document} ...
3
votes
1answer
70 views

How to draw a harmonic plot in latex?

I am trying to plot the graph shown below (even arrows or lines to show important frequency points would be enough) I have been searching for hours, but I cannot find a sample code that can help me ...
3
votes
1answer
115 views

How to draw 3D surface plot from .csv with asymptote

How can one draw "regular" 3D surface plot in Asymptote from data.csv? Following (I dare to say basic) code with the help of pgfplots does the job (suppose you have optimal data format): \...
3
votes
2answers
314 views

How to plot my data smoothly like excel does?

i have the following Code where i use the smooth function, but the graph generated is not smooth. If i use Excel, i do get the smooth graph as expected. Anyone who can help me figure out how to ...
8
votes
1answer
621 views

How to make this figure using pgfplots in Latex?

I try to find a example to make a similar figure equal this example but not found. Thank you
3
votes
1answer
53 views

Cumulative animated scatter plot from data using animate package

Trying to create an animated scatter plot that shows the cumulative data over time. I'd like to create an animation for this plot using the animate package: Edits: For clarification, I'm hoping to ...
0
votes
1answer
21 views

how to delete extra labels in bar plot in Latex?

How to delete extra labels on X axis: 53, 113, 241. I spent plenty of time to do it reading manuals on pgfplots and others... \usepackage{pgfplots} ... \begin{tikzpicture} \begin{axis}[...
3
votes
1answer
76 views

How to smooth spectra plotted with Tikz?

I want to smooth these spectra which were plotted from lab experimental data, with more than 1000 point for every spectrum. I tried to control smoothing using tension=1, or "each nth point", niether ...
2
votes
1answer
35 views

PGFplots with row wise plot with .dat file

I have the following data.dat file, which looks like this n 1 2 3 4 L1 11 7 13 14 L2 52 61 17 18 L3 9 10 11 12 I want to plot make a plot of L1 (y-axis) against n (x-axis). The same ...
2
votes
3answers
85 views

Parametric Plots Using Latex

I want to create a plot of the following parametric equations: x(t)=t*sin(t), y(t)=t*cos(t) -3pi/2 <= t <= 3pi/2 Also, I want to show the tangent line on the same chart, which is: y-o = (-pi/...
1
vote
1answer
69 views

How to plot $x^2+y^2 = 4$ and $z=2$ in 3-dimensional space in Latex

I'm trying to plot $x^2+y^2 = 4$ and $z=2$ in 3-dimensional space with axes labels. I came across pgfplot and tikz-3dplot but I could not do it.
3
votes
1answer
59 views

Plotting a graph of a function that can't be solved in LaTeX (or wolframaplha)

I would like to plot a graph of this function: Alternatively it could be expressed like this: Either way, it's a symbolic expression, and as far as I'm aware, LaTeX can't solve it for me. ...
10
votes
1answer
187 views

How to typeset maths above the curve of a function with TikZ, with the curve masked (or locally opacified) to improve readibility?

I want to label a family of curves representing a simple family of mathematical functions : x -> x²+c where c will take various values between, say, -6 and 6. I want to superpose the label directly ...
1
vote
1answer
46 views

Calculation of residuals with pgfplots

I want to create a residual for this graph: \begin{figure}[hbt!] \centering \begin{tikzpicture} \begin{axis}[,width=\textwidth, axis lines=middle, grid=major, ...
3
votes
1answer
69 views

How to typeset text along the curve of a mathematical function with TikZ

I want to label a family of curves representing mathematical functions by writing at some place of the curve the formula directly on the trace. More specifically, my family of curves is the very ...
0
votes
0answers
58 views

problem in using \usepackage{pgfplots} package

I think I have a problem with using \usepackage{pgfplots} package since when I compile any file latex using pgfplots, it fails with this error: ! Text line contains an invalid character. l.232 ......
0
votes
0answers
25 views

Pgfplots: Two legends for scatter plot with multiple plots and classes [duplicate]

I need to create a detailed scatter plot. It contains two different plots, each with several classes - each plots can contain upward of 1000 coordinates with varying levels/classes in each. There may ...
1
vote
0answers
64 views

Plot colors in tikz [closed]

I have a problem that is doing my head in, I am trying to color a graph with the color "Mahogany", thing that works when writting in a beamer but that suddently happens to stop working in an article. ...
0
votes
0answers
21 views

Plotting simple CDF graphs

I am working on a homework assignment that requires me to sketch simple cumulative distribution functions and probability mass functions. They are either step functions or discrete points. Can someone ...
1
vote
0answers
94 views

PGF generated plot via Matplotlib and using relative font sizes when input to LaTeX

I can produce plots on matplotlib and export them to pgf successfully. But I believe that by first defining a base font size on matplotlib rcParams (11pt for example), and then defining things like ...
0
votes
0answers
73 views

Tikz: addplot error using pythontex

Please, help solve this issue. The python code have the objective of calculus the derivative of an expression f(x). If I uncomment the line %\addplot [domain=0:10, samples=100, color=blue ]{\pyc{...
0
votes
0answers
113 views

Cannot plot from files anymore after re-installing Miktex

I have recently re-installed Miktex and I cannot plot form a file anymore that compiled before re-installing it. The following code \documentclass{article} \usepackage{tikz} \begin{document} \begin{...
2
votes
0answers
59 views

Plotting two functions and their intersection using tikz/pgfplots

I'm new to both tikz and pgfplots, and I am having trouble getting an image of the functions f(n) = 2n^2 and g(n) = 50*n*log2(n) on the same plot. I want the domain to go from n=1 to n=1000, and I don'...
0
votes
0answers
64 views

how can I plot this with Tikz

I want to use Tikz to draw the image below, I have data for the values of x, y and u/u_b
0
votes
1answer
51 views

Dot plot with small axis values

I am trying to produce a dot plot where the horizontal axis represents probability. At the moment, running the following code generates a very squashed dot plot, like the image in the screenshot. ...
0
votes
0answers
28 views

pgf matrix plot mask values in colormap

I would like to make a matrix plot with the following script, where all 0 values are displayed in white all other values according to the colormap. Is there a masking feature in pgf plot? Could it be ...
0
votes
0answers
20 views

How to put two plots in one figure, vertically? [duplicate]

I have two histograms. Together they tell one story, so I want to put them in one figure. I want to stick to one column format, therefore I want them vertically. How can I do that? I've only seen ...
0
votes
1answer
95 views

Plot characteristics of a PDE

In this answer on MathSE there are plots of a the solutions of the Burgers equation along certain characteristics, which is different from a slope field. Since the answer's author has left the site, ...
1
vote
1answer
54 views

Trend line is not matching with the excel trend line

I am plotting a scattered graph with trend line using following code \RequirePackage{fix-cm} \documentclass[smallextended]{svjour3} \usepackage{tikz, pgfplots,pgfplotstable} \begin{document} \begin{...
5
votes
1answer
80 views

Make pgfplot lines dashed automatically below maximum of functions

I want to create a graph which displays linear functions whose maximum builds a piecewise-linear-function (PWLF) labeled max in the minimum working example below. Currently, to highlight the maximum, ...
0
votes
0answers
36 views

Matlab plotting symbols

Is there a set of commands that I can use in latex to reproduce the plot markers used by MatLab? So far I am using $+$, $\bigcirc$, $*$, $\cross$, $\square$, and $\diamond$. The $*$ symbol is ...
8
votes
3answers
471 views

programmatically drawing sinusoids with tikz

Here's eight full oscillations of a sine wave: Here's the code: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[gray!20] (0,-2) grid (32,2); %...
1
vote
1answer
53 views

Tikz: positioning of plot within node?

I would like to use \begin{axis} and \addplot within a node, as follows: \begin{tikzpicture}[xscale=0.5,yscale=0.5] \pgfmathdeclarefunction{gauss}{2}{ \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)...
2
votes
1answer
77 views

Draw a surface using Tikz

I am very new to tikz and I would like to draw the following picture I attempted and here what I got \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{width=7cm,compat=1.8} \...
2
votes
1answer
172 views

pgfplots: How to create heatmap with date as x-axis?

Assumed we want to draw a nice heatmap in pgfplots with date as x-axis. Minimum Working Example (MWE): \documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{positioning,calc}% \...
1
vote
2answers
92 views

How to include a set of four subplots (2x2) as one subplot of another set of (2x2) subplots using groupplots?

What I am looking for is something like this: and I have tried the next MWE: \documentclass[10pt,a4paper]{article} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \begin{...
0
votes
1answer
44 views

PGFPlots logarithmic scaling of x axis and ticks base 2

I'm trying to create a plot, where my x axis is scaled to base 2 and the ticks should be at the exact height of the coordinates. I have the logarithmic x axis, but i just can't get the ticks to be at ...
3
votes
2answers
98 views

PGFPlots Line Plot at constant x

In this and this question, we learned how to draw real line plots in 3D axes in PGFPlots by supplying samples y=1 (samples y=0 seems to work as well) or y domain=0:0 to get rid of meshes/matrices. ...
1
vote
0answers
83 views

How can I improve the drawing of Thomae's function? [closed]

I 'm trying to draw Thomae's function (in black). I want the plot below. I used marmot's code from here. \documentclass[tikz,border=3.14mm]{standalone} \begin{document} \begin{tikzpicture}[scale=8] ...
3
votes
0answers
113 views

Drawing airfoils from .dat external file

I am trying to include plots of airfoils in my report and have tried using this method: http://www.texample.net/tikz/examples/airfoil-profiles/ Initially, I had multiple errors and the document ...
0
votes
1answer
58 views

Two Dimension System with plotting coordinate

I have plot that I need to draw in latex however I am having hard time to plot using latex. I have started the plot bit I am not able to label all the quadrant and do the projection. Please see the ...
0
votes
1answer
62 views

EPS Picture is not located correctly by dragging and drop the eps file into texshop

I am using TexShop to write a document. For inserting my figures, I have converted them to eps files and then dragged and dropped into latex environment. I have set the size of figures to be the same ...
3
votes
2answers
125 views

How to reveal TikZ plot with \printanswers in exam class

In the exam class, you can reveal solutions by uncommenting the command \printanswers. This allows the author to keep both question and solution in the same document, without needing to manually ...
-1
votes
1answer
39 views

don't know the equation of the function but want to plot it [duplicate]

I know how to plot a function if i know the equation but in this case i don't know the equation of itself , thus i want to plot it by using some curve or approximation command thanks for the help
-1
votes
1answer
62 views

Help with some Graphs [closed]

I've been trying to reproduce these graphs so I can use them to a school project, but I don't know where to start. I'll be happy if someone can take his precious time and help me with some codes that ...
0
votes
1answer
69 views

how to plot function from multiple points

Actually wanted to draw and plot Optical and acoustic branch but don't know it what's the command to draw a function like this ? Thanks for the help