{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

5
votes
2answers
121 views

Error: “Dimension too large…” when plotting EXPONENTIALS with TikZ

Despite having read answers to 4-5 relate questions, I still can't get why my code does not compile. Here it is: \documentclass[11pt,twoside]{book} \usepackage[paperheight=24cm, paperwidth=35cm, ...
8
votes
1answer
109 views

pgfplots: wrong domain, wrong axis, uncentered graph… is it a bug?

Question I get a very strange graph with pgfplots, see the picture below. What is going wrong? Code and picture \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
4
votes
2answers
124 views

Adding points when plotting a graph: how to do with tikz?

My question How can I add plots to the graph I am drawing, in order to have a more precise drawing? My code I am learning how to plot graphs. Here is the code I use. You can see on the picture ...
4
votes
1answer
86 views

Opacity for pst-3dplot object

How can the opacity of a pst-3dplot object be set to be transparent? I have an example where using opacity or strokeopacity options do not work. I am trying to make an image similar to the following: ...
1
vote
1answer
58 views

Plot - quarters in axis?

I am new to TEX How can I plot this variable and keep the quarters in the x axis ? date variable 1993Q1 0.71957432 1993Q2 0.622643199 1993Q3 0.557352546 1993Q4 0.78844216 1994Q1 0.677342246 ...
0
votes
1answer
107 views

How to draw a induced charge under soliton - Feynman diagram?

Can someone illuminate line-by-line clear, how to draw this diagram? Just a clear LaTex code is enough. Thank you!! Either for the case: (1) in an equation or (2) in the figure.
7
votes
1answer
94 views

Tikz: Correct arrows at the end of parametric curves?

\documentclass[11pt]{amsart} \usepackage{tikz} \begin{document} \begin{tikzpicture} [scale=4] \draw[domain=0:0.4, smooth, variable=\t, samples=200, ->] plot({(1/sqrt(2)*(\t-\t^3)}, ...
1
vote
1answer
82 views

Drawing lines in a plot and give them a label?

I am on my first adventure in plotting with LaTeX. I managed to get my bar chart plotted. I have two groups of values for which I want to show the average. I intend to put a horizontal bar over the ...
3
votes
1answer
107 views

Draw a surface from scattered curves

I have a few curves determined by some points. I need to plot the surface that they determine. That is, I have this \begin{tikzpicture}[scale=0.8] \begin{axis}[% width=12cm,height=12cm, xmin=0, ...
7
votes
1answer
127 views

Color and legend for 3d surface

I'm trying to plot a 3d surface using pgfplots and this is what I have done so far: \usepgfplotslibrary{patchplots} \begin{tikzpicture} \begin{axis}[% width=12cm,height=12cm, xlabel={$J_1$}, ...
5
votes
2answers
120 views

Is it possible to extrapolate data for a 3d-plot in pgfplots?

I am having several measurements to plot and would like to use something like a 3d surface from pgfplots. I am having a frame as outer border and a grid as measurement raster. The measured values are ...
2
votes
1answer
78 views

Simple Line-Plot with date on x-axis

I need to do a really simple line plot and my data is looking like this: Date Value Apr2013 0.06 Mai2013 0.08 Jun2013 0.1 Jul2013 0.2 Aug2013 0.4 Sep2013 1.5 Okt2013 2.0 Nov2013 4.1 Dez2013 8.1 ...
4
votes
1answer
124 views

How can I import and scale matplotlib plots, keeping fonts the correct size?

I'm working on several pieces of coursework involving lots of plots generated with matplotlib in python scripts. Currently I'm doing this with an iterative process where I set a plot size in the ...
3
votes
1answer
81 views

How to add a 2d plot to a 3d axis drawing?

My task is quite simple. I want to add to my 3d axis drawing a 2d plot. My closes result is this: \begin{tikzpicture} \begin{axis}[ axis equal, view={45}{30}, ...
2
votes
2answers
107 views

precision in xy axis in tikz

I have this code \begin{tikzpicture} \begin{axis}[% width=\figurewidth, height=\figureheight, scale only axis, xmin=0, xmax=1.5e-05, ymin=1.222e-07, ymax=1.224e-07 ] \addplot [color=red,line ...
1
vote
0answers
85 views

Drawing back to back stem and leaf diagrams? [closed]

I have drawn a back to back steam and leaf diagram but it looks messy. Is there a code I can use which would make it look professional?
7
votes
2answers
151 views

Plotting 3-dimensional Sets

I am using MikTex and Texworks with pgfplots to try and plot 3 and 2-dimensional sets Could some of you nice fellas help me out? I am trying to plot: I can print out the page and draw per hand ...
1
vote
0answers
51 views

Draw a normal distribution by Latex [duplicate]

I would like to draw the following picture by Latex. Please help me a bit. Kind Regards
3
votes
0answers
103 views

Include R output as pdf in Texmaker

I just switched from texshop to texmaker on Mac OS X. However, now the plots I want to insert from R as pdf in the document are missing the fonts in the pdflatex output. It used to work fine with ...
0
votes
1answer
97 views

Generating plots in a simple way

Yesterday I learnt how to make simpe plots using tikzpicture and I'm very satisfied of the result: \begin{tikzpicture}[thick,scale=0.6] \begin{axis}[ xlabel=$\delta$, ...
10
votes
1answer
163 views

Why (\x)^2 and \x^2 produce different results in Tikz plot? [duplicate]

(\x)^2 will plot correct parabola, while \x^2 will have negative x branch upside down. Why () are required for this formula to work? \documentclass[10pt]{article} \usepackage[utf8]{inputenc} ...
19
votes
8answers
760 views

Plotting Weierstrass function

I'm trying to plot Weierstrass function using only basic TikZ picture functionality (no gnuplot or whatnot). How do I use sum in a \draw? Do I have to make a new command? Use a loop? An alternative ...
2
votes
1answer
118 views

How to exclude negative values from plot of PGFPlots package?

I'm plotting bar plot using this code: \documentclass[tikz,12pt]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} ...
2
votes
1answer
244 views

Adjusting Vertical and Horizontal Space between nodes in tikz flow chart

I got the following flow chart diagram in tikz. MWE \documentclass{standalone} \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{calc, shapes, arrows, positioning} \begin{document} ...
4
votes
1answer
102 views

Plot 2-D data point in just one plan

everyone! I have got a little problem trying to draw in LaTeX. Let me try to explain: I have a xyz-axis, as you can see on the figure below. Plotting any 2-D data point graph in the xy-axis: ...
3
votes
2answers
130 views

Problem with tikz plot in beamer

I'm trying to plot a function using this code \begin{tikzpicture} % Draw the log-normal distribution curve \draw[blue,smooth,thick] plot[id=f1,domain=0.001:6,samples=50] function ...
4
votes
0answers
75 views

Table vs Plot: How to print table of values, with colors representing values

In an effort to collect knowledge that will ultimately allow me to answer this question, I am seeking a way to generate a table where numeric values are plotted as cell-filling colors. The color ...
16
votes
2answers
772 views

How can I produce a graph from a table?

What I want to do is plot a graph for a given data set. This must be simple to do, but I just cannot find a simple explanation of how to do it... I have the following table (no problem so far): ...
2
votes
2answers
94 views

Linewrap in legend in pgfplots [Solved]

I try make plot with long text in legend. \documentclass{report} \usepackage{pgfplots} \pgfplotsset{ every axis legend/.append style={at={(0.5,-0.13)},anchor=north,legend cell align=left}, tick label ...
7
votes
1answer
254 views

Huge table/matrix with colored boxes

I have a huge CSV file with about 25.5k records that (structurally) looks like the sample below. In essence, I want to display the values of the columns U,V,W,X,Y,Z of each row as a colored box. The ...
3
votes
2answers
178 views

Bar chart from CSV file with adjustable bar width

I have a CSV file with approximately 1500 records that I would like to plot using something like a bar chart, but I don't know where to start at all. Each record contains a width and a height, which ...
6
votes
2answers
442 views

Draw angle between two lines in a circle

I'm trying to draw an angle between two lines. I have this code so far, but i cant draw a angle. How do I do it? I'm using PGF/TikZ. \begin{figure} \begin{tikzpicture} \begin{axis}[ ...
5
votes
1answer
96 views

Plot using pgfplots from a text file in long form (vs wide form)?

In the statistical programming language R, there are two different forms to represent data. The wide form looks like the following: subject time age weight height 1 John Smith 1 33 90 ...
4
votes
2answers
190 views

Plot data from a LaTeX table

I have a table in LaTeX format. I would like to plot a few figures using this data, having the five frequencies (125, 250, 500, 1000, 2000, 4000) on the horizontal axis, and the absorption coefficient ...
5
votes
2answers
108 views

Plotting graph and data with PSTricks: Wrong scaling

Consider the following code: \documentclass{article} \usepackage{pst-plot} \begin{document} % options \psset{ xunit = 5, yunit = 50 } % constants. \def\masse{0.183276667} % kg ...
6
votes
1answer
270 views

Plot functions and data together using PSTricks

I would like to create the following graph using PSTricks: The data, which can be downloaded from http://gupl.dk/705644/, should be plotted together with the three graphs. I have managed to plot ...
6
votes
1answer
85 views

Strange result in plotting data using pgfplots

I'm trying to plot this: \begin{tikzpicture} \begin{axis}[ height=5cm, width=\linewidth] \addplot[smooth,blue] plot coordinates { (27,177) (28,223) (29,240) (30,227) ...
4
votes
1answer
168 views

How to change the color scheme to make this figure more elegant?

Here different colors means different weight of the edge, and the color of the points is arbitrary. The tex code: \documentclass[aps,prl,superscriptaddress]{revtex4} \usepackage{subfigure} ...
3
votes
1answer
79 views

Best way to produce a graph similar to one generated by Maple

I wish to produce the following graph from Maple in my Latex document, here is my Maple code: p := x -> ...
2
votes
2answers
142 views

Why does tikz not plot this even function correctly? [duplicate]

Can someone provide an explanation and a fix for the fact that my plot is not what is expected? The function is symmetric with respect to the y-axis. The plot correctly shows the function for positive ...
2
votes
1answer
138 views

Save TikZ plot points calculated with PGF math library to .table file?

Is it possible to let TikZ save and in subsequent compilation runs use the plot points generated with the PGF math library? A (simple) example of such a function plotted that way is: ...
4
votes
2answers
161 views

Can not plot x^4, sqrt(x) or x^3 + 5x^2 using pgf/tikz

I have recently started using LateX, and I am beginning to use pgf/tikz to create plots. But I have encountered some problems with the functions stated above. I can plot the function f(x)=x^3, but ...
1
vote
1answer
58 views

pgfplots tick lines are behind const plot

The tick lines in the plot are in a layer behind the actual plot. Have a look at this example below: \documentclass[11pt, oneside]{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} ...
6
votes
3answers
423 views

Weird result plotting sin(x) using tikz/pgf [duplicate]

Trying to plot the sin(x) function, I get this result: The MWE is here: \documentclass{standalone} \usepackage{ pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} ...
5
votes
4answers
337 views

How to plot a curve in a polar form r = f(Θ)?

Can we use LaTeX to make the graph of $\rho = \sec(\theta)$?
5
votes
1answer
309 views

Plotting semilog plot with pgfplot

I am trying to graph frequency response of certain filters. This is the code I currently have: \begin{tikzpicture} \begin{semilogxaxis}[xlabel=Frequency, ylabel=Gain, xmin=1, xmax=20000, ymin=0, ...
5
votes
1answer
154 views

PGF Math: “An internal routine of the floating point unit near”

I am using this snippet: \documentclass{beamer} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$x$, ylabel={$f(x) = x^{-1}$} ] \addplot {x^{-1}}; ...
4
votes
1answer
148 views

Superposing histogram and barplot (with transparency)

I'm having troubles when I try to plot in the same graph a bar plot and an histogram. This is my MWE (you can find my data set at the end of the post). \documentclass{standalone} ...
5
votes
1answer
205 views

How draw lines at certain angle on a function graph in TikZ

How can one draw orthogonal tick marks on a function? For instance in the following plot I would like to make orthogonal tick marks on the function y=x^2, say. \documentclass{article} ...
4
votes
1answer
218 views

Missing bars in pgfplots histograms

I have a problem with pgfplots, when I try to plot some data from a file. I use the following code \begin{figure}[p] \centering \begin{tikzpicture} \begin{axis}[ybar ...