{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
1answer
64 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
14 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
43 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 ...
0
votes
2answers
91 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})}{ ...
0
votes
0answers
8 views

How do I plot the intersection of two fit lines in gnuplot? [migrated]

I have a data file that looks something like this: # Test of 6 0.1 3.2 0.4 5.9 0.7 8.0 0.9 10.1 0.1 1.5 0.4 4.3 0.7 9.5 0.9 13.5 # Test of 10 0.1 5.5 0.4 6.3 0.7 6.9 0.9 8.5 0.1 0.5 ...
4
votes
1answer
141 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
51 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
20 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
44 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 ...
0
votes
1answer
102 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
227 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
176 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
82 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
30 views

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

I want to make this graph. I have only excel data.
4
votes
0answers
77 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
83 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
47 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
23 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
31 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
46 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 ...
0
votes
0answers
36 views

pgfplotsset error

I am running the following code \documentclass[% reprint, amsmath,amssymb, aps,onecolumn,showkeys, %pra, %prb, %rmp, %prstab, %prstper, %floatfix, ]{revtex4-1} \usepackage{graphicx}% Include ...
1
vote
1answer
49 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
36 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
48 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
82 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
577 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
24 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
153 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
53 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
71 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 ...
0
votes
1answer
122 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
102 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 ...
3
votes
1answer
58 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) ...
1
vote
1answer
65 views

Get node text inside filled region in tikz

I have made this figure from this code: \documentclass[tikz]{standalone} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture}[domain=-90:200, x=0.025cm, y=0.15cm] \draw[->,very ...
2
votes
1answer
40 views

Duplicate values when writing value near coordinate

I am using this code, taken from my question here. The problem arises when two x values have the same y value. Then the label I want to write near the coordinate overlaps with the other one. How can I ...
3
votes
1answer
49 views

Write a value near a coordinate in a plot

I want to do it from a file, rather from inside the document like I do it now: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
50 views

How to add one mark to one line in pdfplot

I am attempting to differentiate each line in the graph. Then I try to use marks, however it looks messy. Is there a way to make it looks more tidy? I am open to any suggestion that works. ...
20
votes
3answers
394 views

Plotting a graph with several values of a parameter

I'm trying to plot the function q(t) = (4.9/ (w^2))*(cosh(w*t)-cos(w*t)) for several values of the parameter w. That is, I want to plot whole graphs of q vs t, where I plug in say w=1, w=2, w=100, or ...
1
vote
1answer
60 views

How to arrange the key in this plot?

basically I have plot like this: It looks bad because two reasons: The middle figure, five keys are overlapped with lines The 6 key in the third figure, even they are not overlapped, they are not ...
2
votes
0answers
64 views

How to place two plots inside a node?

I'm eager to have two plots (of the algebraic functions) placed horizontally inside a node. I'd like them to be signed, so something like caption (below the plot) is needed. One of them — "the good ...
0
votes
0answers
58 views

matplotlib2tikz - compilation error for 2D

Situation: I am using matplotlib2tikz to export a two dimensional plot (comparison). Exported to pdf it looks like this: Including the tikz file (and compiling) yields an error though: Package ...
2
votes
1answer
138 views

How I can draw a semitransparent gray sphere shell with a hole using TikZ?

I need to represent a gray sphere of radius R with a hollow circle defined by a cone of angle alpha, and I have the cone part but I do not know how to draw the sphere .... I Have this: ...
3
votes
1answer
67 views

drawing line between plotted points

How do you have the line draw between points that have been plotted on a graph? Here's what I've done so far. \begin{tikzpicture}[>=latex] \centering \begin{axis}[ axis x line=center, axis y ...
0
votes
0answers
77 views

Plotting piecewise functions with TikZ

I would like to use TikZ package in LaTeX to draw the following piecewise functions and their graphs: f:[0, \infty)\rightarrow \mathbb{R} such that f(0)=1, f(x)=0 if x>0; g:[0, 1]\times[0, ...
0
votes
1answer
79 views

How do I draw the graph of the floor function floor(x/2)? [closed]

Im confused as to how to draw some values because they take the same spot. For example: floor(-4/2)=-2 floor(-3/2)=-2 How do i draw it when the values are the same? I am unable to draw the circle ...
1
vote
0answers
66 views

Random lines in a plot [closed]

Hi everyone, I have never used pstricks or tikz and it seems to be the best option to draw the kind of plots that I need. I have been researching and I have not found how to draw this random line ...
2
votes
1answer
58 views

Problems plotting histograms as a line graph?

I would like to plot some percentages as a line graph, so I tried this: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=2.12} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
80 views

How to plot this histograms as a line graph?

Let's say I have this histogram plot: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ symbolic x coords={a small bar,a medium bar,a large bar}, ...
4
votes
1answer
188 views

Tikz surface plot

Does anyone know how to replicate this Mathematica plot in tikz? (If possible: I'd like to use "pattern=crosshatched dots" to fill in the shaded region.) Below is the Mathematica code: ...
3
votes
2answers
65 views

Problem with `plot` option for `gdraw` in MetaPost

I have the following problem with MetaPost and graph package for it. So I have a source: input graph; beginfig(1) draw begingraph(16cm, 2cm); gdraw "a.txt" plot "+"; endgraph; ...