# 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.

1,034 questions
Filter by
Sorted by
Tagged with
58 views

### Restricting tikz plot to multiple domains due to dividing by zero

I'm trying to plot a formula where for my intended domain, a division by zero will be done. Overleaf/latex gives me the following error: Dimension Too Large. I think this has to do with each other. ...
1 vote
50 views

### Tikz: fill square mark in axis environment

Can I fill my square marks in yellow? When mark are *, I just can write fill=yellow \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{tikz} \usepackage{pgfplots} \usepackage{float} \begin{...
15 views

### How can I make graphs with boxed text or math and arrows?

How can I make graphs like this?
1 vote
14 views

### Scatter plot from dat file where each mark size depends on 3rd column in table? [duplicate]

I am trying to create a basic scatter plot where each point's mark size has a unique value given by a 3rd column in the dat file. In the code below, mark size should be mediated by the 'Mag' column. ...
1 vote
63 views

### Drawing 2d and 3d vectors using lua or luamplib in LaTeX

Here is the tikz code using which vectors can be drawn. \documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage{amsmath} \begin{document} \tdplotsetmaincoords{60}{120} \begin{...
1 vote
105 views

### Is there a easy way to plot Jacobi Elliptic Functions with Tikz-PGF?

So The Jacobi Elliptic Functions are a little bit tricky to plot because they depend on the complete elliptic integral of the first kind K(k) that can be written as a sum of double factorials, and the ...
39 views

### How do I plot the solutions of an equation of a 3D Plot?

I want to plot all possible solutions for sqrt(|x||y|) = 2 into my plot as a line. My code for the plot currently looks like this \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat = ...
1 vote
82 views

### Plot graph with labels

How can I draw the following graphs? I wanted to do this with Python or Matlab, but I heard that this also works with LaTeX.
142 views

### How to plot this modified Bessel function?

I'm new to TeX and I wish to plot in my master's dissertation the graph of the function $E_2:\mathbb{R}^2 \setminus{0} \to \mathbb{R}$ defined by $$E_2(x,y)= (2 \pi)^{-1}K_0(\sqrt(x²+y²)),$$ Where ...
53 views

### autoregressive neural network with tikz

I am trying to draw an autoregressive NN with tikz but i am quite stuck. This is what i've done so far: \tikzset{% every neuron/.style={ circle, draw, minimum size=1cm }, neuron ...
44 views

### how do use multido to plot in pspicture

I would like to use multido to plot secant lines in pspicture. \documentclass{exam} \usepackage{multido} \usepackage{pst-all} \begin{document} \psset{xunit=2cm,yunit=1cm} \begin{pspicture}(-0.4,-1)(...
1 vote
42 views

### How to define coordinates based on function in pstricks

I would like to define coordinates based on a function. \documentclass[pstricks,border=12pt]{exam} \usepackage{pst-all} \begin{document} \psset{xunit=2cm,yunit=1cm} \begin{pspicture}...
51 views

### Draw a tangent line to a curve [duplicate]

I would like draw a curve (without knowing the function) then place a tangent line at a point on the curve. Basically the same as below but with a smooth curve. \documentclass{exam} \usepackage{tikz} \...
1 vote
89 views

### Classification of index in Phase Portaits

I am trying to make the following graphs horizontally, I used the following answer as a basis: input: \documentclass[border=1mm]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings,...
49 views

### Scatter Plotting an Image in a Pspicture with Polar-Type Coordinates

I would like to be able to direct an image from a fixed point in a pspicture to various locations in the picture individual specifying angles and radii from that point. Consider the code (which I ...
31 views

### pgfplots - Connecting max Values with new Line Curve

I need to create a plot showing a curve, which is connecting the peaks of other curves. Like the drawn black curve in the following picture: The other curves are created by the following formula and ...
49 views

### Draw dots on specific points of a line

With the contribution of a kind user : it has been possible to reproduce this scheme : Using this code : \documentclass[margin=3mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}...
77 views

### Draw this scheme on TikZ

I am currently trying to draw this graph using Tikz : The fact is that I am a bit lost with this process since it's my first time trying to do so. I am reading a documentation but this is only about ...
1 vote
72 views

### An Efficient Method for Drawing a Constellation of Glowing Stars

As an application of the question posed in How to Give Stars a Glow Effect Consider the code \documentclass{book} \textheight 8.5in \textwidth 5.75in \usepackage{tikz} \usetikzlibrary{fadings, calc} ...
21 views

### How to annotate in plot and colorbar

Well, I wrote this MWE \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pgfplotstableread[col sep=comma, header = true]{ label, angle, tempo, coef Cx-1, 45, 1....
88 views

### Can anyone help figure out why this graph won't plot in Tikz?

I'm trying to plot the following Fejer's Kernel: ((sin(7x/2)^2)/(sin(x/2)^2))*(1/16). Below is the following code that ive tried but for some reason I keep getting errors. Can anyone tell me why this ...
676 views

A query I am trying to write in latex and attach this image. I did it separately, downloaded the pdf file to keep its resolution and attached it to my latex file. Is there a way to do it directly ...
102 views

I am writing a code that plots the Lagrange polynomial of a given function. I have all the necessary data, but I can't find a way to plot $P(x) = \sum_{i=0}^n (f(a_i) \prod_{j\neq i,j=0}^n \frac{x-a_j}... 4 votes 4 answers 189 views ### Help with a figure with absolute value I am trying to draw$y=|x|^{1/2}$on LaTeX, but I have no idea how to do it. I tried to use this code \begin{tikzpicture} \begin{axis}[% domain = -3:3, samples = ... 0 votes 1 answer 48 views ### Color list not working When I try to color the addplot using cycle list name=color list it doesn't work for some reason, the color of all the lines stays black. Here is my code: \documentclass{standalone} \usepackage[utf8]{... 0 votes 0 answers 60 views ### LTSpice plot to Latex I have .plt plot from LTspice programme and would like to insert it into Tex, but have no idea how change .plt syntax into .tex syntax. I've checked this, but it seems that it doesn't work anymore. [... 3 votes 2 answers 88 views ### Plotting complex numbers and it's conjugate I want to plot this in my latex document : I have been trying to do it but it has always given me errors, I don't know if my code is right or if I am missing to import something (I already imported ... 2 votes 2 answers 107 views ### How to plot two functions and their characteristics I want to be able to have two functions on a graph, one is a blue rectangle and the other is any signal. In addition, I would like to be able to illustrate the names of the signals, a width, a height ... 0 votes 0 answers 52 views ### Shaded ellipsoid with curves on it My final goal is to replicate the following figure (at least the right part) in tikz-3dplot: For now, however, I'd like to ask only about plotting an ellipsoid in tikz-3dplot with "ball color&... 2 votes 1 answer 57 views ### How to draw tikz figures side by side, while using a loop? Right now I have some code like this: \begin{minipage}{1cm} \begin{tikzpicture} \draw plot[domain=0:2,rotate=-90] (\x, { (sin(pi*\x r)* sin(pi*\x r) + sin(pi/2*\x r)*sin(pi/2*\x r) + 2*... 2 votes 1 answer 102 views ### Asymptote 3d plot of an implicit function (with absolute value) When I run the following code, the program seems to go into an infinite loop. If I write a function without the abs function, the program runs normally. The resulting plot is similar to the picture ... 0 votes 0 answers 55 views ### How to sketch a quadratic region using tikz? I am trying to do the following two things but can't seem to find the most efficient way to do it: sketch y>ax^2+bx+c or y<ax^2+bx+c sketch overlapping regions between a quadratic function and ... 0 votes 0 answers 26 views ### How can I plot the graph for a conditional equation? I have the following equation: g(x) = \begin{cases} x + 2 & \text{if } x \ne 3 \\ \text{undefined} & \text{if } x = 3 \end{cases} how can I plot a graph that shows it's ... -1 votes 2 answers 130 views ### Tikz plot smooth lines How can I reproduce the line inside the red circle of the image above? My code is: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{patterns, arrows,shapes,positioning,shadows,trees, ... 2 votes 1 answer 177 views ### Plot f(x,y)=2-x^2-y^2, extrema value It's easy show that f(x,y)=2-x^2-y^2 has a maximun value in (x,y)=(0,0), I need a plot show this result. I tried this: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{... 1 vote 1 answer 86 views ### Smoothing a pgfplot curve I am trying to generate plots with smooth curves using the pgfplots package. Setting the smooth option in the \addplot command does not seem to make any change. \documentclass{article} \usepackage{... 2 votes 0 answers 40 views ### How to plot function from a .csv file in Tikz? The .csv file created from the example from Tikz manual is misread (as all y values are 0) [duplicate] Note: This question is not exactly the same as TikZ data visualization fails to load data from file because I don't have any error thrown by the code (the log don't display "! Package PGF Math ... 1 vote 1 answer 123 views ### Shading region in LaTeX I have the following LP $$\begin{array}{cc} \min & 15x+20y \\ \text{subject to:} \\ & x+2y\geq 10 \\ & 2x-3y\leq 6 \\ & x+y\geq 6 \\ & x,y\geq0 \end{array}$$ ... 2 votes 0 answers 68 views ### how to plot with TikZ a function that takes a sphere and projects it onto 2D space I'd like to take a sphere, then apply a linear transformation from 3D (the space of the sphere) into 2D. I wish to plot the resulting linear transformation. Currently my code looks like this: \... 1 vote 0 answers 62 views ### I need help ploting an equation I am trying to plot a function in terms of another one, but my code is taking too long and at the end i am not getting any plot. The function that i am trying to plot is: i_c(U_c(x)) U_c(x) = 5+exp(-... 0 votes 1 answer 56 views ### Plotting a bimodal distribution with TikZ I have tried without success to plot the curve of a bimodal distribution. Is there a generous soul who can come to my rescue. 2 votes 1 answer 154 views ### tikz cosine function plot without pgf I am trying to plot a function with cosine and exp. It can plot the exp part but not the cosine. I have tried cos, \cos, cosine, \cosine none work. This code used to work for 3 months ago maybe ... 1 vote 1 answer 64 views ### Create a graph with very large number of edges I am trying to create in Latex a graph with a very large number of edges. Something similar to the attached image (taken from a paper by Bissyandé et al). I've tried to simply draw a graph using ... 4 votes 2 answers 120 views ### How to smooth the graph$\chi(t)=\sen(\pi t)\exp\left(\dfrac{-1}{\sen^2(\pi t)}\right)$I am graphing these two functions $$\chi(t)=\sin(\pi t)\exp\left(\dfrac{-1}{\sin^2(\pi t)}\right)$$ and$\rho(t)=\sqrt{\frac{1}{A}\int_0^{t+1}\chi(x)dx}$, where$A=\int_0^1 \chi(x)dx$. I only ... 3 votes 3 answers 93 views ### How to add a rectangle to, and display an evaluation line on, a function plotted using pgfplots? I have the following function plotted with pgfplots: I would like to somehow add a window as follows: It can be just lines or have a transparent background color. The code I am using is this: \begin{... 1 vote 0 answers 60 views ### Some book to learn to graph 2D and 3D I have been drawing in a fairly basic way for a long time or using alternative programs to generate my graphs, but now I would like to learn how to graph in Latex but I don't know where to learn to ... 1 vote 1 answer 61 views ### Plot line in Kiviat’s graph hides the background text The following is the hexagonal Kiviat’s graph from tkz-kiviat package. Though the plot made is fair enough, but the lines of the plot hide the background text. I used stackengine and adjustbox ... 2 votes 2 answers 45 views ### Ticks and label superposed with pgfplots my problem is that I need more digits in the y ticks. When used precision=4, the y label and y ticks are superposed. ¿How can I avoid this? \documentclass{article} \usepackage{pgfplots} \begin{... 5 votes 3 answers 1k views ### plot$(e^x-x)^{\frac1{x^2}}\$

I need to plot the function (e^x-x)^(1/(x)^2) in tikzpicture, but close to 0, apparently latex indeterminates it, does not graph it. This is the code I am using: \documentclass[1cm]{standalone} \...