{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

6
votes
3answers
458 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
319 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
65 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
79 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
276 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} ...
0
votes
1answer
124 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
221 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
91 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 ...
1
vote
2answers
94 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
134 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
76 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
105 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
244 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
127 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
39 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} ...
0
votes
1answer
220 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 ...
1
vote
1answer
104 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
202 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
117 views

How can I draw the following plots?

I have two plots. How can I draw them? Thank you
4
votes
1answer
196 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: ...
2
votes
1answer
246 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
169 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
197 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})}{ ...
4
votes
1answer
280 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
93 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
95 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
157 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
449 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
200 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} ...
2
votes
1answer
175 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
76 views

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

I want to make this graph. I have only excel data.
6
votes
2answers
224 views

How to draw interlocking tori with Tikz?

I need to draw a couple of interlocking tori, as in the picture, using Tikz. I've been looking at some examples online and all I find is instructions to do it with Gnuplot, nothing about Tikz. If ...
3
votes
1answer
128 views

Ticks stop early in PGFPlot

So I was trying to produce this with PGFPlot and got pretty close with the code below but (apart from the major/minor ticks not being as different in their lengths as in the example) I have one ...
1
vote
1answer
75 views

put a plot inside a table

i want to :) well as you can see \documentclass[french,12pt,oneside,openright]{memoir} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[a4paper]{geometry} ...
1
vote
0answers
32 views

Plot data points with 'linespoints' but lines should have gaps [duplicate]

I have asked following question on stackexchange regarding a gnuplot solution: Plot data points with connecting lines but which leave gaps. The question is about using following linestyle for data ...
1
vote
0answers
121 views

3D point plot - visualization

I've some points of the form (a+ib, c) where a,b,c are real numbers. I.e. "(complex number, real number)". I would like to visualize these points in a 3D plot such that the x,y-plane represents the ...
1
vote
0answers
131 views

pgfplot mesh with end arrow decoration

Inspired by this question I tried to decorate my pgfplot mesh with an end arrow. However, this end arrow is not properly positioned so that the end of the line shows behind the arrow tip. Here is a ...
1
vote
1answer
61 views

move the “.10^-2”

Move it to the right so it will be aligned with the other yticklabels about 0.2cm or more Thanks \begin{tikzpicture} \begin{groupplot}[group style={group size= 2 by 3,horizontal sep =1.5cm,vertical ...
2
votes
1answer
184 views

plotting statistical data, putting years at the Xticklabel PGFplot

I want to plot these data and i can't figure out how to put the years at the X axis, I want to display all the years not a 5 year step. \begin{tikzpicture} \begin{axis}[width=8cm, x tick label ...
5
votes
2answers
126 views

adding nodes to line segments

I have the following code: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage[active,float]{preview} \usetikzlibrary{calc} ...
3
votes
2answers
258 views

Not able to plot a parabola

I am making a multiple choice problem. (Here, I display two of the choices.) I am trying to plot parabolas using pgfplots. Why is TikZ not compiling my code? I put a % in front of the parabolas ...
7
votes
5answers
778 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 ...
2
votes
1answer
148 views

pgfplot: adjust legend style and add several paths

I read the pgfplots manual the whole day, but unfortunately I am not able to achieve the following: (1) legend style: make the legend-equation align left and modify the rectangular box to another ...
5
votes
2answers
486 views

Need to plot a function in coordinate system

I would like to plot a rational function in LaTeX. I tried different ways with Tikz or pgfplots... nothing works. There are many different ways. Often there are problems with poles / asymptotes etc. ...
1
vote
0answers
160 views

Tikz: Rational Functions (Hyperbola)

I am aware of similar questions, but as they don't exactly use the same syntax as I am trying to do, I can't see what's different between my way of writing functions down and the others. Here's what ...
1
vote
1answer
314 views

Group plot: Replacing the values (labels) on x-axis

I'd like to replace numerical labels (e.g., 1,2,3,4,5) on x-axis with names (e.g., A,B,C,D,E) in a group plot environment on a case-by-case basis. The group plot environment seems to easily support ...
1
vote
1answer
207 views

How can we draw these graphs like in this book?

Can you show me which tools we can use to draw the graphs look like in this book? (see below figure). Sorry, I don't know exactly where I can post this question.
3
votes
1answer
330 views

Tikz functions and coordinate system: Adding points and labels

I managed to adjust some of the existing code a little bit to fit my needs. I can plot simple functions. (1) I want to add labels to the coordinate system, for example e (~ 2.71) to the x-axes and ...
4
votes
1answer
196 views

Why are my symbolic x coordinate labels printed twice in a tikz plot?

I'm trying to plot a bar graph, using symbolic x coordinates. For some reason, the name of some symbolic coordinates appears under the x axis more than once. If I increase the width (e.g. 12cm) ...