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

Want to plot curve from points and want to remove axis values

Actually want to draw this curve exactly but dunno how to plot it from the points and can't remove the axis values \begin{figure} \centering \begin{tikzpicture} \begin{axis}[ grid style=dashed, ]...
22
votes
5answers
2k views

TikZ silhouette of human face seen from the side

I am trying to make this picture in TikZ. I wondered if anyone had already needed a silhouette of a human face, and therefore maybe had some code for a plot or something. Just in case anyone had ...
3
votes
3answers
58 views

Minimal page size for 2 tikzpictures

I am trying to prepare a graph for a colleague to use. I have created the graph but wanted to crop the white space surrounding it. I have tried to use the standalone document class but this results ...
1
vote
1answer
45 views

Easy way to plot potential energy curves? [closed]

I need to plot the potential energy curves, i.e. to do something similar to this: I know, that I could use pgfplots to get the curves, but what I'm troubled about are the labels - I'd like to do both ...
-1
votes
1answer
54 views

How can I make this plot/diagram in LaTeX?

Hi, can someone help me make this plot in LaTeX?
3
votes
2answers
372 views

erasing a part of a plot

How is it possible to erase the line (keep it short) that goes up to infinity and use an infinity symbol to indicate so? (Do not touch the rest of the plot and the inserted numbers please if possible.)...
2
votes
2answers
52 views

Tikz show the corner coordinates of a rectangle

I use the following Latex script \documentclass{article} \usepackage{tikz,xcolor} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \filldraw[fill=gray!40!white, draw=black] (0,0) ...
4
votes
3answers
1k views

plotting a linear programming problem

I am a beginner in LaTeX, but I am learning as I go. I want to plot the following linear programing problem: (plot: to make a graphic) f(x,y) = 2x - 3y -> max x + y <= 12 x,y >=0 Here is ...
1
vote
1answer
59 views

Plot along path in TikZ

I'm trying to automate drawing filled plots along (mostly straight) paths. A simple example of what I'm trying to achieve: \documentclass[border=2cm]{standalone} \usepackage{tikz} \usetikzlibrary{...
1
vote
2answers
636 views

Drawing a sideways parabolic curve in tikz

I am able to draw parabolic curves in tikz by using \draw and parabola bend \begin{tikzpicture} \draw (-3,4) parabola bend (0,-.5) (3,4); \end{tikzpicture} However I would like to draw this ...
3
votes
1answer
39 views

How to plot a dashed line for some data predictions followed from a solid line from historical data

Problem I have a set of data from a .dat file, which every value could be "historical" or "prediction". year emision data_type 2008 9.24309 hist 2010 8.50724 hist 2012 8.06490 ...
2
votes
2answers
45 views

Cannot shift plot in Tikz picture

I have nodes that are placed at specific positions in my Tikz picture, and I would like to put a plot next to it. To do this, I am using a shifted scope. However, when I change the shift values, ...
0
votes
1answer
27 views

Plot figures on the y axis with pgfplots

I have a graph and I want to plot on the Y axis figures instead of numbers or text. My code is the following: \begin{tikzpicture} \begin{axis} [ xbar, xmin=0, xmax=10, width=7cm, height=8cm, ...
0
votes
1answer
60 views

Plotting over/underfitting graph with TikZ package [closed]

I am trying to find a way of illustrating supervised learning good/over/under-fitting, like:
2
votes
0answers
64 views

pgfplots: Best practice to avoid “TeX capacity exceeded” when plotting huge data sets?

I want to create some huge pgfplot with three different axis and a lot of data points. In summary there are 20160 lines of data existent. My problem is: All few hours the values will change ...
1
vote
1answer
58 views

pgfplots: Using “x filter” to decrease point density of plot

The user esdd has posted a nice approach on how to increase point density for a certain range of data points while the remaining plot keeps low point density by using x filter. Minimum Working ...
0
votes
1answer
92 views

Plotting functions on IPE

IPE Drawing Tool is a free open source software for graphing. It follows friendly with TeX programming and writing, and that's when my question comes along. I've been trying, for a few days now, to ...
1
vote
1answer
45 views

Plot of function in tikz has kink

When plotting the square root function I get a kink, in this MWE at ca. x=0.2 (this depends on the domain). Is there a way avoiding this? \documentclass{article} \usepackage{tikz} \begin{...
2
votes
2answers
54 views

pgfplots: Restrict “each nth point” to specific domain only?

I have a huge amount of data. Therefore I want to reduce the data displayed by decreasing the amount of points with each nth point = {!value!}". Minimum Working Example (MWE): \documentclass[tikz]{...
10
votes
6answers
2k 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 ...
1
vote
0answers
46 views

How can i make a tornado plot?

I am trying to make a tornado plot that shows what the price will become when i change diffrent values, i want the x axis to be like the picture underneath with 77 as my base cost, but i can not ...
2
votes
1answer
37 views

Effective way to plot values with a vast difference between them

Here's a nice simple bar graph. It's effective when the plotted values are in the same kind of ballpark, but when there's an outlier, it can put things out of wack. For instance, I want to plot some ...
2
votes
1answer
36 views

tkz euclide How to give arrowheads on both sides to axes?

I'm using tkz-base and trying to plot inequation on x axis. I wanted to show arrowheads on both sides but when drawing X axis I get arrowhead only on right side. How do I get on both sides? I tried ...
3
votes
1answer
66 views

tikz: from scientific notation to decimal form

How can I get the first abscissa value in decimal form as 0.05 in (0.05,31.9)? It is set to the scientist notation automatically. \documentclass[border=2mm]{standalone} \usepackage{amsmath} \...
9
votes
4answers
729 views

Plot complete Fermi-Dirac integral in Lualatex

I am trying to plot this function with lualatex
1
vote
1answer
28 views

tikz: draw plot by given coordinates points

I'm trying to draw, in a T=f(x) plane graphic, a curve passing through four points whose coordinates have been obtained experimentally. The x axis range is 0 to 0.5, the y axis range is 0 to 80. This ...
3
votes
1answer
88 views

Plot graph near zero

I want to plot the following function with TikZ. \begin{tikzpicture}[scale=0.7, declare function={ func(\z) = 1/(2*(abs(\z)^3)) * ( (1+abs(\z)) - 2*ln(1+abs(\z)) - 1/(1+abs(\...
3
votes
2answers
261 views

pgfplots: How to draw exponential graph with 60° start angle?

I want to draw a simplified Michaelis-Menten kinetic (monod-function) to compare it with a linear function. Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \...
3
votes
1answer
119 views

How do I create a curve on Latex?

I want to create a curve using tikz. As can be seen, the curve is made of connected lines with no rounded connection points and I would like to round off the edges. Following is my code: \...
6
votes
2answers
297 views

pgfplots: How to draw a tangent graph below two others?

Assumed I want to draw three simple graphs based on the following illustration: How can I plot those three graphs? I've tried to create something like this: Minimum Working Example (MWE): \...
4
votes
1answer
40 views

Pgfplot - How to exactly align the legend in a plot

I have a legend in my pgfplots and want to manually position it at a point where the legend does not cover any text or measurement points. I know the axis property legend pos=north west, but it's not ...
0
votes
0answers
45 views

Matlab2tikz // Error divsion by 0.0

I created a minimal working example in Matlab: [x,y] = meshgrid(-2:0.1:2,-2:0.1:2); fx = x.*y; fy = x.*y; figure quiver(x,y,fx,fy) matlab2tikz('plot.tex'); This works great and creates the plot....
1
vote
0answers
41 views

Sum of sub-bars on top of stacked bars in tikz

I want to be able to display the sum of the values on top of the bars. Below is my code and under that, an illustrated image that displays the values I want to show. Can this be done? \documentclass{...
5
votes
2answers
204 views

TikZ plot too verbose

I was wondering if there was a more succinct way to express the following plot (I'm using the plain format): \input tikz \tikzpicture \draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15); \draw[-&...
0
votes
3answers
77 views

Ploting the roots of a polynomial

I want to plot the roots of any given polynomial on the complex plane. Example: Let $P(x)=x^4-x^3-1$ be given. I want to plot on the $Oxy$ complex plane all four roots of this polynomial. I suppose ...
6
votes
3answers
415 views

Plot a function of two variables equal 0

I would like to plot the function x2(1 − x2) − y2 = 0 in LaTeX. I tried running following code \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage[utf8]{inputenc} \...
6
votes
1answer
7k views

Adding axes labels to LaTeX figures

I have almost managed, With this code: \begin{figure}[htb] \hspace*{-5cm} \begin{minipage}{0.5cm} \rotatebox{90}{\textcolor{red}{$y$-axis label}} \end{minipage}% \begin{minipage}{\dimexpr\linewidth-...
3
votes
1answer
93 views

What is the domain in a tikz parametric plot?

I don't understand what's going on here. If the domain of the parametric parameter \t is 0:100, then the function sin(2pi*t) should oscillate about 100 times, but it only oscillates a couple. What am ...
2
votes
3answers
181 views

How to use a mathematical expression as xticklabel

I have prepared a code including some data resulting in a bar plot. I want to use a mathematical expression as xticklabels but my code does not work. How can I figure this point out? Here is my code: ...
0
votes
1answer
45 views

text in the same line under figure

How can I modify the code that all words in the same line , i.e. u=0.3230mm in the same line \begin{figure}[h] \centering \subfloat[$u = 0.3230 mm$ ] ..... \end{figure}[h] thanks a ...
1
vote
1answer
63 views

How could I graph z=sqrt(x^2-y^2) using Pgftools? I believe I've all suggestions on the internet but to no avail

I have tried graphing it with the parametric notation (i.e. ({x},{y},{sort(x^2-y^2)}) and as seen on my code below but nothing renders the image shown on graphing calculators. \begin{tikzpicture}[...
4
votes
4answers
404 views

Showing discontinuity in graph with intermediate value

How can I make a graph like this in LaTeX? The important things are: the circles at the extremities of the graph, one black and one white the arrows tracing the graph from both sides of the ...
1
vote
1answer
64 views

How can I 3D plot y=4x^2+z^2 using Pgfplots?

I am trying to 3D plot y=4x^2+z^2 using Pgftools but I'm unable to use z as an independent variable in the function. \begin{tikzpicture}[scale=1.5] \begin{axis}[ grid=major, 3d box=complete, ...
3
votes
4answers
325 views

Plotting a closed parametric curve and shading the area inside it

I wish to plot the curve defined by the parametric equations x = 1+sin t,y = 3 + 3(cos t)^3, such that the region bounded by this curve is shaded. As far as the code goes, I can't seem to find a ...
0
votes
1answer
25 views

pgfplots rotating the whole page instead of only the axis

I'm facing a weird problem when generating a bar chart in pgfplots. In my chart I have a lot of labels in the x axis, which I try to rotate 90 degrees using the command xticklabel style={rotate=90,...
4
votes
2answers
121 views

Align plots within tikz pictures one above the other

I have an issue I trust you will solve. I am plotting two graphs in order to represent Bode diagrams. For correspondance of abscissa they should be one above the other. I can align the figures but ...
2
votes
3answers
158 views

TikZ PGF: How to hide parts of 3D graph when lower than surface?

Assumed we have this kind of 3D surface: Minimum Working Example: \documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[zmin=0,zmax=0.5,...
4
votes
1answer
508 views

How to use a summation in a tikz plot

I need to plot this function using tikz, but I have no idea how to go about using the summation in tikz. If someone could help me I would really appreciate it. The code I have is this: \...
3
votes
1answer
66 views

Epicycle and deferent with Tikz - Function syntax

I want to build an epicyclic graph and found a useful trigonometric function on the web (URL is in comment in my MWE). My personal issue is that I can't write a complex function as a "plot" argument. ...