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
1
vote
1answer
55 views

Use Tikz to plot different sine waves without plotting zero

I need to plot a variety of sine waves and almost have the graph looking exactly how I want. However, I am unable to remove the 0π or make it look like 3π/2. \documentclass[tikz, border=5mm]{...
1
vote
2answers
94 views

How to plot Lebesgue singular function in Tikz?

I would like to know if there is a way of plotting a Lebesgue singular function using LaTeX (Tikz). Lebesgue singular function $L_{a}\colon[0,1]\to[0,1]$ is defined as follow. Imagine fipping an ...
0
votes
1answer
43 views

Latex cant read from my .dat file

I wrote a .dat file from Matlab. this data has 8 columns each having 1x101 values. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{pgfplots,tikz,graphicx} \title{ Experimental ...
0
votes
1answer
78 views

Gaussian Pulse? [closed]

I need to build Gaussian pulse in time and frequency domain, as depicted in the figure. I tried tikz library but could not.
2
votes
1answer
38 views

How do I show the difference between bars in a bar chart using pgfplots?

I am attempting to recreate a graph that looks like this (with only two groups) using pgfplots: So far I have been able to produce this: Here is the code I have written: \begin{center} \begin{...
2
votes
2answers
44 views

pgfplot basic linear plot question

I'm trying to plot this simple graph resembling the graph below So far I've figured out how to graph some basics using the below but don't know how to plot coordinate and y-intercept along with the ...
0
votes
1answer
44 views

Point plot with drawings in it and abbreviations

I am very inexperienced with latex and tikz, but I need a diagram for my work. I've tried many examples, but the result never looked good. So I hope that one of you can write me a template. The result ...
1
vote
1answer
88 views

Visualizing a function defined through a summation

So many times I visited this site to hopefully find an answer to my questions and many times I found what I was looking for, so first of all thanks to the most experts who share their knowledge. I ...
0
votes
1answer
48 views

Tikz: error plotting function with parameters

Could you spot the error? I'm trying to plot a function with two parameters, the initial condition of a differential equation. The same pattern works for simple functions. \documentclass{article} \...
1
vote
0answers
40 views

How to draw tan(x) without pgfplot?

I want to know why output of the following MWE is ugly? i.e. yrange=-3:3 has no effect!! \documentclass[12pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{amsmath} \usepackage{...
1
vote
1answer
41 views

Applying matrix on a tikz figure

I would like to apply a matrix (say 1&2\3&4) on a rectangle I drew in tikz. I tried doing so with cm but it fails to produce a parallelogram as I expect. MWE: \documentclass{article} \...
0
votes
1answer
42 views

pgfplots, table-plot: Could not parse input as a floating point number

I get Could not parse input 'A' as a floating point number What do I have to change here? \documentclass[border=5pt, tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{...
0
votes
1answer
52 views

How to draw a beam or frame system in Latex

(hopefully not a duplicated QS) how can we draw a beam or frame systems in Latex in an easy way? For example, we may see the following figure as reference
2
votes
1answer
119 views

How to draw graphs of standard functions using mpgraph?

Is it possible to draw graph of standard functions using mpgraph (probably using lua, mplib)? For example something like gdraw(sin(x)+cos(x)), gdraw(2x+3) and in general gdraw(f(x)) where f(x) is ...
0
votes
0answers
31 views

Tikz : Color gradient for curves

I try to make a color gradient for a curve, with the same way as "left color=..., right color=..." for fill figures (but I want it just for a curve). I found this way : \begin{tikzpicture}[ x={(-...
0
votes
1answer
45 views

How to draw a pgfplot (Line chart) with text in x-axis instead of number?

I am trying to create a Line chart with text at X-axis instead of number but unable to do so. Below is my MWE. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{verbatim} \...
0
votes
1answer
36 views

symbolic data on plot in latex

I want to plot some data and for one of them I want to show (0.1,Inf), where Inf stands for infinity. Also, I want yaxis to be in log-scale. I have attached a sample photo of what I want to plot. ...
0
votes
0answers
27 views

Highlighten specific x-axis values

I need some help to plot a small figure for my thesis. I know that the question is towards Matlab, but I export the figure as a tikzpicture and genuinely think that you guys deliver the better ...
4
votes
2answers
168 views

How to draw a graph with label x-axis in word and not number?

I actually want to draw a graph like below: Basically, I want to have a graph using the data below: Testing1 9 3 Testing2 4 5 Testing3 4 5 Testing4 1 4 Testing5 1 5 ...
0
votes
4answers
151 views

Draw a coordinate system with some labeled points by using TikZ

How can I draw above picture by using tikz or pgf?
1
vote
1answer
30 views

How can I plot a coloured labeled graph of a heavily recursive function?

I am trying to write some personal notes based on the notes for a course I took a long time ago. In these notes the professor had the following graphs: These graphs are beautiful and made with ...
1
vote
1answer
81 views

Drawing simple DNA helix [duplicate]

I want to draw a simple schematic of a DNA helix. Using the sine function seems like a simple way, so here is what I have: \documentclass[border=2mm,tikz]{standalone} \usetikzlibrary{math} \begin{...
0
votes
0answers
32 views

In LaTeX how can I find the distance from the label of the y axis of my figure to the border? (it should follow the basis rules))

I want to follow a rule of thesis that observe the least distance; for example 2.5 cm from the left border, and now because I use the subfloat command and have 4 figures near each other, I want to ...
0
votes
0answers
47 views

How can i plot a surface in latex using external data?

I am trying to plot a surface using this data: 186.39 10.634 0.98471 189.82 10.433 0.98489 199.92 12.122 0.98745 197.92 11.911 0.98709 186.87 10.567 0.98485 199.34 11.517 0.98723 194.29 ...
1
vote
1answer
31 views

Pgfplots grid lines cut plot lines

In this plot the grid lines are cutting the plot lines, how can I tell Pgfplots to draw the plot lines "above" the grid? Also I would like to shade the area right of plot line "6" how can this be done?...
3
votes
1answer
70 views

Trying to make a curve

I need some help. I'm a beginner in Tikz and I want to draw this curve but my problem is that I don't have the function of the curve. Please help me! My MWE is: \documentclass[a4paper,12pt]{...
21
votes
2answers
489 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
18 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
60 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
24 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
69 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
80 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
200 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
351 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
650 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
67 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
23 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
88 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
56 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
109 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
82 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
67 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
191 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
72 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
83 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
60 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
26 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
78 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
24 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
266 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 ...

1 2 3 4 5 17