Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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
35 views

Graphing probability density functions

I am writing a LaTeX document that involves the discussion of many probability mass functions (binomial, poisson, geometric, negative binomial, hypergeometric, zeta) and probability density functions (...
2
votes
1answer
49 views

sketching a polar curve using tikz and orientation counterclockwise

I would like to modify the code below so that Can I indicate the counterclockwise directions with arrow -- from O to B -- from B to A -- from A to O Also, 2. Can we indicate theta_1 and theta_2 ...
1
vote
0answers
45 views

Fixing “broken” peaks in 3D plot

I am currently trying to get a nice smooth 3D plot using tikz, however, I am failing to do so in only one case. The complied file is smooth in most areas, yet, in the "peal" areas, the plot gets ...
0
votes
1answer
23 views

Only one point visible with pgfplots

I am trying to display multiple plots with pgfplots, but only one point is displayed (with a lot of overlapping) : And the latex : \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=...
0
votes
0answers
19 views

Load graphicpath set by variable

I would want to define Variables to load from a certain path with a certain name composition like: \newcommand{\Simulation}{callistotoeuropa190} \newcommand{\Timestep}{16000} \newcommand{\FigPath}{/...
1
vote
2answers
41 views

Minipage/subfigure issue - creating a set of 4x3 graphs (12 total)

I am trying to fix a 4 by 3 set of graphs, with caption, on a .tex file. The result I want to achieve is the following: (this was done in Word. Yes, that's lame, I know.) The code for each small ...
1
vote
1answer
30 views

How do you fill the 'o' arrowhead white?

%%%%%%%%%%%%%%%%%%%%%%%% \plot [Triangle-o,smooth,very thick,domain=11:-11]{-0.1*x+1.7}; %%%%%%%%%%%%%%%%%%%%%%%%
0
votes
1answer
16 views

pgfplots change distance of only one xtick

I have a semilog plot with the xticks 10^0, 10^1, 10^2, 10^3 and 10^50, whereby the xlabels have the same symbols, with the exception of 10^50 which has an infinity label. Now, when I plot this the ...
1
vote
0answers
47 views

Extract one specific value from table/csv to draw an horizontal line

I need to add horizontal lines (asymptotes) to a plot made from a csv file, with the y-axis value taken from this last. I found an example to draw the horizontal lines \addplot [thick,black] table[x=...
2
votes
1answer
68 views

Small scale grid using Tikz

I am trying to create a grid that only has a domain between -0.8 and 0 and a range between -0.8, 0,8, with the grid not showing any positive X values. Thus far I have this: But when I try to shrink ...
7
votes
1answer
76 views

Solid region enclosed by surfaces

I'm trying to obtain the solid regions showed below for didactical purposes: I know that with psplot in 2d one can do things like that (area enclosed by two curves) and the output is very nice (I did ...
2
votes
1answer
44 views

pgfplots memory error due to specific xmax limit

I am facing a problem with setting the limits of my plot in pgfplots. The following script (from an answer here ) \documentclass[border=5mm]{standalone} \usepackage{pgfplotstable} \begin{document} \...
0
votes
1answer
56 views

Create one linear line plots from each row of data in table

I have a table where the data has the following format: | x | y | dydx | |------|------|-------| | x1 | y1 | dydx1 | | x2 | y2 | dydx2 | | x3 | y3 | dydx3 | I want to create a ...
1
vote
1answer
41 views

Two plots with different ranges in a single plot

I have two plots with different ranges. I want to draw them in a single plot, but if I do so the plots do not show the small fluctuations of each graph. I write: \documentclass[tikz,border=0.5mm]{...
0
votes
0answers
36 views

which latex package to produce computer science data structure [on hold]

I would like to produce similar (for academic purposes) data structure plots (see images below). All images are taken from the book Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson,...
3
votes
1answer
97 views

How to plot a function and its derivative

How can I plot this with \begin{tikzpicture}? the red line should be the derivative at x_0 Pls help :) Thanks!
3
votes
2answers
172 views

To Shade the Area Between $x^2$ and $\sqrt{x}$

I want to draw the following image in tikZ Basically I want to draw the boundary of the unit square, plot the x^2 and \sqrt x functions, and shade the area between them. In my attempt to draw the ...
2
votes
1answer
67 views

3d plot with absolute value function with pstricks

I would like to reproduce the plot given in picture. The function (with known a and c) is a(x^2+y^2+z^2)+(1-a)(abs(x)+abs(y)+abs(z))=c where 0<a<1, c>0 How can I do this?
9
votes
1answer
193 views

Random points in a rectangle

I have made a graph as shown in the following figure: For each rectangle I'd like to generate n random points in it, is it possible? My code: \begin{tikzpicture} \begin{axis}[ grid=major, ...
1
vote
2answers
88 views

Function plots - objective comparison for choosing between tikz data-visualisation and pgfplots [closed]

I am writing my PhD thesis now, and want to plot some results (mainly the evolution of various simulation quantities on y-axis against time on the x-axis). I estimate to have around 50 such plots in ...
0
votes
2answers
100 views

TikZ: Plot contour lines

I have a (continuous) function on the real plane (e. g. f(x,y)=x^2-x*y) and want to draw contour lines (e. g. f(x,y)=-1, f(x,y)=1 etc.). Furthermore, I want to adjust the region where to do this (e. g....
0
votes
0answers
28 views

Drawing piecewise discontinuous plots with pgfplots [duplicate]

I'd like to draw the distribution function defined below: There is a good answer proposing the method to draw a nice graph for step function, but I can't figure out how to do the same for my function ...
0
votes
2answers
42 views

Generate path for \includegraphics with if-else macro

I would like to have a single option/macro (true/false or similar) that determines, from which folder to choose plots. There's only 2 folders for each plot. Mainly need this to switch between low ...
1
vote
0answers
27 views

Set size of \datavisualization

I am trying to plot the function using \datavisualization like this \datavisualization [school book axes, visualize as smooth line, y axis={label}, x ...
3
votes
0answers
50 views

pgfplots - filldraw disappears after adding plot

I have some plots in my graph and want to mark a special area with a square. Here's what the plot looks like: \begin{tikzpicture} \begin{axis}[axis lines = left, xlabel = {Player 1}, ylabel = {...
3
votes
1answer
86 views

Plot 8th roots of unity on complex plane with PGFPlots

This is what I currently have \begin{figure}[h] \centering \begin{tikzpicture} \begin{axis}[axis equal, axis lines=center, xlabel=$\Re$, ymax=1.5,ymin=-1.5, ...
3
votes
1answer
198 views

Problem with legend position

I have been using the tikz package to plot my graphs. When I want to describe each graph in a plot, I use "legend entries" and using "legend pos" I can manage the box describing the graphs. But now I ...
1
vote
0answers
71 views

TeX capacity exceeded using Knitr

I am unable to weave a document containing LaTeX and R code using RStudio due what I think are TeX capacity limitations. Is there a way of fixing this without having to compile using LuaLaTeX which is ...
3
votes
4answers
334 views

Plotting Hermite polynomials

I prefer to plot the first five Hermite polynomials through \draw command (not through the \axis command). There is no problem with the first three ones, but sketching the last two polynomials is not ...
0
votes
0answers
33 views

How to plot greyscale histogram of an image [duplicate]

Is it possible to plot color and greyscale histogram of a given image directly in LaTeX?
3
votes
1answer
60 views

How to fill the intersection among four curves?

In my problem, all curves are plot from data instead of explicit function. And what I want to do is to fill those little curved rectangles with different colors. How could I do it? Here is the tex ...
1
vote
1answer
78 views

Plot the characteristic roots of complex equation

I want to draw the following pictures as plots in the TikZ environment. The first one is the characteristic roots of the equation \lambda + \mathrm{e}^{-\lambda} and the second one is the ...
0
votes
1answer
80 views

How to plot something like this in latex

I would like to graph something like this in latex or R, but my main goal is to do it in Latex. Thanks for the help
1
vote
1answer
38 views

Chaining gnuplot function calls in tikz, reverse plotting

I have a parabola drawn through A, B and C. There are three different equations: for the top darker border, the fill (this is a hack just using a wide line) and the lower border. It's not quite what I ...
0
votes
1answer
55 views

Plotting normal curve with extremely small variance

I need a graph of a normal bell curve centered around t with a variance as small as possible (without being straight line). I've found a bunch of methods to plot a normal graph, but none where the ...
1
vote
1answer
34 views

Unconnecting two segments of a plot

I have copied the code from this previous post about plotting elliptic curve, but unfortunately when the curve has two "parts", I can't figure out how to remove the connection between the two. Here is ...
1
vote
0answers
57 views

How to “set format x” to have the format valid with gnuplot+cairolatex

My gnuplot.plt is set up like this set term cairolatex pdf set output "data.tex" set nokey plot 'data.csv' using 1:2 with lines, And I use the output from gnuplot in my latex like this \begin{...
2
votes
1answer
29 views

Can't move gnuplots into subfolder

I have a data.dat-file that I plot with a gnuplot.plt file with these mentionable lines: set term cairolatex pdf set output "plot.tex" This generate a plot.tex, with labels, axes, etc and a plot.pdf ...
3
votes
2answers
63 views

Duplicate irregular lines

I want to create two irregular lines, one on top of each other, that follow the same pattern. Following an answer from @vialrogo on the post Drawing randomly ragged lines in technical drawings I got ...
3
votes
1answer
54 views

Help to dual Y axis, dual stacked plot

The B means the block will be Blue, R means Red, Y means yellow, etc ... In plot, it will not be written, it represents only the colour of the plot. Related Link MWE: \documentclass{article} \...
-2
votes
1answer
102 views

Draw mathematical analysis figures in latex [duplicate]

I wonder if it is possible to draw the following figures in latex: For the first image I want a typical real analysis diagram. For the other three I want to draw a cylinder and with squares and ...
0
votes
0answers
48 views

Plot sum of distribution [duplicate]

I have 1000 data points close to zero (absolute value < 0.1), adding up to 1. I want to plot their sums. I.e. if they followed a normal distribution, I'd want to have an S curve plotted. I'm aware ...
0
votes
0answers
29 views

Latex plot 3D surface from a gridding matrix

How to plot a 3D graph from a gridding matrix like this Matrix gridding (41x41): 0.4346 0.39557 0.35384 0.31542 0.28228 0.25556 0.23441 0.21819 0.20558 0.19559 0.18758 0.18116 0.17588 0.17142 0....
1
vote
0answers
39 views

Show “log-”ticks in the case of small range

I use the pgfplots package. Is there any solution to show the "log"-ticks when the range of the data are small? One solution consists in increasing manually the range using xmin, xmax, ymin and ymax ...
1
vote
1answer
133 views

PGF/TikZ plot: syntax and limit range of plotted function

In this answer an example of multiple functions plot is provided, using PGF/TikZ and the datavisualization library. The documentation seems not to deal with the following issues: 1) For each plot, ...
4
votes
3answers
104 views

Draw edges with varying/random curvature in TikZ

I want to draw a network plot, but many edges are overlaying. I want to vary curvatures of the edges to make overlaying edges visible. My initial idea was to make the curvature a random uniform ...
-2
votes
1answer
103 views

How to draw graph with TiKz?

Please, help me draw in latex.
2
votes
1answer
68 views

draw line between points given by single command

What I want to do is draw a line between points that are defined in a command like this but without the connect to (0,0): \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{...
2
votes
0answers
21 views

Inter- and intra-group spacing in bar plots

Can someone help me manage the spaces between bars in a bar plot. I have the following data: 0.0000,0.0001,0.0001,0.0003,0.0006 0.0001,0.0001,0.0003,0.0006,0.0011 0.0001,0.0003,0.0006,0.0011,0.0022 ...
1
vote
1answer
48 views

Add arrows on parametricplot

Hi i'm trying to add the red arrows on the curves, I got arrows on the line with ArrowInside, but on the parametricplot coundn't get it. \psset{arrowscale=2,ArrowFill=true} \begin{pspicture}(-5,-4)(...