{plot} is for questions concerned with plotting data or functions using TeX. For questions specific to the pgfplots package, use the {pgfplots} tag.

learn more… | top users | synonyms

2
votes
0answers
80 views

How to create a plot like the one shown [closed]

My program is currently making plots which look like However, I would like to produce a plot with font and plot axes which looks exactly like the following: I do not care about the actual data ...
4
votes
2answers
121 views

tikz plot not correct [duplicate]

The following code generates the wrong plot: \documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[domain = 0:1, samples = 500] \addplot[color ...
1
vote
2answers
226 views

Plot multiple functions when data-columns are separated by comma pgfplots

I have a csv file with 2 "columns" separated by comma. So the .csv file looks something like 0.123,0.3232 1.244,1.325 The above numbers are the "y-values" at x=0 and x=1 respectively, i.e. the ...
4
votes
3answers
149 views

Horizontal parabola [duplicate]

How does one draw a horizontal parabola, left or right oriented? I can easily draw: \draw[blue, line width=1.75pt, domain=-2.00 : 3.00, samples=1500] plot[smooth](\x, {\x*\x - \x - 2}); and even ...
5
votes
1answer
54 views

Color list not respected

I imposed a new color list but it is not respected in my code (that is the following). Every group of marks and the own line should have one color of the list. This is the result I have: \...
1
vote
1answer
99 views

Use pgfplots to plot a single column .txt file [duplicate]

I have a single column .txt file with the following info in it 1 2 3 4 5 I use the following ME and it does no work: \documentclass[border=1]{article} \usepackage{pgfplots} \pgfplotsset{compat=1....
2
votes
1answer
107 views

Plot a data/Table from Mathematica using `pgfplots`

I use data1 = Table[] in Mathematica 9 (M9) to generate a table of values. The thing is that when I read the data file, there's only one column! How can I plot this data file in LaTeX using pgfplots? ...
3
votes
3answers
112 views

LaTeX and Mathematica plot with same font/style

I know there are a couple of questions with answers to this but none of them seems to work for me so I ask here. Some basic facts: I have 1. Mac OSX 2. Very limited knowledge in Terminal (so things ...
0
votes
1answer
65 views

How to plot the Neilian Parabola with Latex?

I want to plot the Neilian Parabola with Latex. The problem of course is that at zero the curve has a singular point which leads to errors when trying to plot the curve. I've already searched on the ...
1
vote
1answer
105 views

Help with plot figure

I have the following two questions: I would like to move the "genomic position" label further down How can i draw the thing i added poorly in paint? This is the code \centerline{\begin{...
1
vote
1answer
106 views

Allee effect plot with Tikz

I'm trying to use Tikz to plot a rough schematic of the "Allee effect" in population dynamics. However, I've been struggling with the finishing touches. Below is my try: \begin{tikzpicture} \draw[...
2
votes
1answer
178 views

Forest plot with TikZ

I'm trying to create a 'Forest Plot' in TikZ. An example of this is below: I have experience with PGFPlots but I can't find an example or even a starting point for something like this. The only ...
1
vote
1answer
115 views

Diagram in tikz

I've been trying to replicate this image , using TIKZ, but so far the results have been very bad. I'd like to know with you have tips/hints on how I should do it. Thank you!
1
vote
0answers
47 views

strange results when plotting a function that i declared

I've declared two functions, the first of which (Gamma) works fine, but the second gives me really strange results that aren't right (after checking in excel). I've tried changing al the parameters ...
1
vote
0answers
23 views

Histogram: problem labeling x axis [duplicate]

I would like to add on the x axis the value for each bar that are 400, 500, 600 and 700. I don't know why the only one that appears is 400. The code I used is the following \documentclass[a4paper,...
2
votes
2answers
100 views

How to create an grouped histogram with table annex

I am trying to code the following graph with latex. Can someone do it? (grid settings and colors are not important) the table is the following \begin{filecontents}{table.dat} T L F LF 400 0....
5
votes
3answers
80 views

Implicit plot - ellipses

I need to draw a pencil of conics: Given two ellipses $\left( \frac{x}{a_1}\right)^2 + \left( \frac{y}{b_1} \right)^2 - 1 = 0$ and $\left( \frac{x}{a_2}\right)^2 + \left( \frac{y}{b_2} \right)^...
13
votes
1answer
382 views

Plot with magnifying glass, with a different plot in it

I would like to magnify a function plot, but in the magnified area I would like to draw a different plot. As an example, I edited an image taken from another discussion on TeX Stack Exchange I have ...
6
votes
3answers
513 views

Plotting the sign function

I'd like to create a graph of the sign function in my document: using pdfplots and tizkpicture (as used here). Could you please let me know how to define the function in the addplot part? \...
6
votes
1answer
347 views

Visualizing a set of complex numbers

Suppose I have an infinite unbounded set of complex numbers, for example all the numbers outside the unit circle. Is there some good way to visualize that set using LaTeX with some drawing library?
0
votes
0answers
74 views

How to create tikz figures via knitr forcing labels featuring LaTeX's font size modifier-commands?

Is there a way to force knitr to create tikz code which includes font size information? The output would be something like this: \begin{tikzpicture}[every node/.style={font=\footnotesize}] Here is ...
2
votes
1answer
85 views

Drawing smooth path of particle through magnet system

I need to get a plot with a trajectory of particle through system of magnets. So I know the coordinate and angle of particle on the edge of each magnet (like y=0,5 alpha=0.3rad) so how can I draw a ...
8
votes
1answer
297 views

Histogram: different color for each bar

I have the following code. \documentclass[a4paper,twoside,12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage[english]{babel} \usepackage{pgfplotstable} \definecolor{...
0
votes
1answer
134 views

How to plot this integral function with PSTricks? [duplicate]

I have to plot something like that (the function I have to integrate is more complicate than this) How can I do that? Which pst package do I need? Thanks!
3
votes
2answers
247 views

Is there a guide on creating graphs in Latex for signal processing?

I wish to create a graph commonly used in signal processing, for example: I am not sure if I should go about exploiting Tikz or use some other software to generate this plot. Does anyone know if ...
0
votes
1answer
98 views

TikZpicture/pgfplots: How to reduce quantity of displayed xticklabels when using “xticklabels from table”?

I want to generate a simple x/y-diagram with data out of a data-table (~ 2000 values). Minimum Working Example (MWE): \begin{filecontents}{Data_Table.csv} X Y 00:00 0 00:01 50 00:01 100 00:...
1
vote
2answers
109 views

How to decorate the intersection of two figures on TpX

There is a way to plot something like that on TpX?
3
votes
1answer
155 views

TikZpicture/pgfplots: How to insert time-data in mm:ss-format (without hh:) into x-axis?

Imagine an ordinary x/y-diagram by using the pgfplots/tikzpicture-packages: In case of regular date-values (dd-mm-yyyy) usually there is no problem in application. But now, I have to add times-values ...
2
votes
1answer
86 views

Set origin of y axis to 1

How to set the origin of y axis to 1? Minimal example: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{figure} \centering \begin{tikzpicture} ...
6
votes
1answer
113 views

Plotting piecewise function using declare function

I am trying to plot a piecewise defined function, but somehow I don't manage to get it right. See below. I use the following code \begin{tikzpicture}[ declare function={ func(\x)=(\x >8/10) * (...
2
votes
1answer
309 views

Generating Plot in Tikz from Text File

I am trying to learn how to generate a plot given coordinates specificied in a text file, for example, the latex code in: https://github.com/daleroberts/obstacle-problem/blob/master/figures/fig1.tex ...
2
votes
1answer
137 views

Draw sphere and add scattered data with color information [closed]

My goal is to plot 3D data (x,y,z coordinates) such that a certain path on/inside a unit ball is illustrated. Since the path will not only be on the surface of the unit ball I have to encode the norm ...
1
vote
0answers
41 views

How do I plot a fourth order system with bodegraph?

I wanted to plot a fourth order system with bodegraph: G(s) = s^2/((s+3)^4) But I dont get how to set the transfer function with bodegraph. \documentclass[border=5mm]{standalone} \usepackage[...
0
votes
1answer
242 views

What is the most practical way to make and include a plot in pdfLaTeX [duplicate]

I often come to a point, where I want a plot of a set of data or just a simple function to be included into my TeX file. The usual naive approach would be to save the plot as a vector or pixel graphic ...
2
votes
1answer
120 views

How to use Pgfplot to draw vertical lines with use of data taken from file

I have one-column example.csv file with time samples (with different intervals). My question is how to use Pgfplot to generate plot with several vertical lines in time samples taken from .csv file ...
5
votes
1answer
215 views

Tikz - conformal map

How can I draw this: With my code I made this far : \begin{figure}[!h] \centering \begin{tikzpicture} \draw (-1,0) arc (180:360:1cm and 0.5cm); \draw[dashed] (-1,0) arc (180:0:1cm and 0.5cm); \draw ...
3
votes
1answer
118 views

How can I draw the following plots?

I have two plots. How can I draw them? Thank you
4
votes
1answer
205 views

Coordinate System in Tikz with plottet with one equation

I would like to have this coordinate system (with numbers on the axes): I know how to make it in Tikz; but the numbers on the axes are missing and I would like to add a plot: \documentclass[border=...
2
votes
1answer
342 views

How can the size of an epslatex terminal plot with gnuplottex be altered?

Are there any other options to set the size of a plot with the epslatex terminal of gnuplottex than the scale option? I noticed that pgfplots doesn't have this effect, but for continuity I want all ...
1
vote
2answers
206 views

Wide space between picture and caption

For some reason my v-space does not show up correctly! Does somebody know wy? \begin{figure}[h!] \centering \resizebox{.5\linewidth}{!}{\input{Figures/NIRS/Extinction}} \caption{Characteristic ...
1
vote
2answers
212 views

Plotting function in TikZ

I am trying to plot the following function: Where x=(x-floor(x)) This is what I have written in my .tex-file: \draw[color=blue,smooth] plot({\x-floor(\x)},{\frac{\cos(\frac{\pi}{6})}{ \cos(\frac{\...
4
votes
1answer
316 views

Trig function not plotting correctly in tikz

I have the following snippet \begin{tikzpicture} \draw[black, domain=0:10] plot({\x}, {cos(((9 - \x)/8)*3.141592)}); \end{tikzpicture} When I compile the file, however, the plot just produces a ...
1
vote
1answer
98 views

3d Graph Error with Plot

I have a problem with plotting a 3d-graph \begin{tikzpicture} \begin{axis}[ title=Exmple using the mesh parameter, hide axis, colormap/cool, ] \addplot3[ mesh, samples =...
1
vote
1answer
135 views

RevTex4-1 figure reference wrong number? [duplicate]

I have included a graphic using \includegraphics into a \begin{figure} \end{figure} in revtex4-1. The figure appears in section II (i.e. 2) but the caption of the figure says Fig.1 (this is not a ...
1
vote
0answers
57 views

Polar Coordinates Graph using TiKz [duplicate]

I have to create a Tikz picture of a limacon which is given in polar coordinates by the equation r = 0.5 + cos(θ) for θ between 0 and 2π. Note:makethe x-axis between 􀀀0.2 and 1.7 with a scale of 3 ...
1
vote
1answer
160 views

elliptic abacus

I use abacus to calculate confidence interval in binomial when nf<5 or/and n(1-f)<5 too. My question is : is it possible to draw this with tikz or with another package? any advice? thank you
2
votes
2answers
526 views

Drawing the limaçon, r=0.5+2cos(theta) in TeX [duplicate]

Could anyone tell me what I am doing wrong please. I am trying to only use the tikz package. My thought process is that; r^2=x^2+y^2 and r=sqrt(x^2+y^2) so using x=(a/2)+bcos(theta)+(a/2)cos(2theta) ...
4
votes
2answers
201 views

How to make the distances look equal?

I am trying to show that any point of a parabola has the same distance from the focal point and the directrix line. But in my plot they don't seem to be equal. \documentclass{article} \usepackage{...
2
votes
1answer
227 views

Problem plotting in TikZ

I have to draw a random curve in TikZ, connecting the origin to infinity. I thought the easiest way to do that would be to plot sin(x)-x from the origin to the left. This way it connects 0 to infinity ...
1
vote
0answers
82 views

How to make the column with line scatter graph. (Double Y)

I want to make this graph. I have only excel data.