{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

3
votes
2answers
200 views

Plotting a function in Latex

How do you draw functions that look like this? I apologize for not providing you with an attempt to solve this problem - I am a second-day user of Latex. Greatly appreciate your help. ...
3
votes
1answer
34 views

pgfplots: symbolic coordinates with line skipping

I am trying to skip lines inside the symbolic X coordinates of the following pgfplots Bar Chart : \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{color} \usepackage{amsmath, ...
2
votes
1answer
22 views

How do I arrange 2 subfigures on top of 1 subfigure?

I'd like the arrange these figures so there are two figures next to each other and one below, like an upside down triangle, so that they all fit on one page and are a reasonable size. How do I do ...
0
votes
0answers
70 views

Matlab graphs in Latex

I wanted to use Matlab plot into Latex , i did some search and I found matlab2tikz, but when i've followed matlab2tikz tutorial , i got an error Could some one show me how i use matlab2tikz or is ...
3
votes
1answer
94 views

Creating performance profiles

A performance profile is a kind of plot used in the optimization community; here below is an example from http://www.gamsworld.com/performance. For an introduction, see Section 22.4 of Higham and ...
9
votes
3answers
519 views

Drawing spherical harmonics with pst-3dplot

For my lecture notes in theoretical physics (namely quantum mechanics) I'm trying to visualize the spherical harmonics. I got Mathematica to plot them an this is what I did: ...
6
votes
1answer
53 views

How do I stack two figures on top of each other, rather than side to side?

I'd like my figures to be one on top of the other, rather than next to each other, so that they are larger and spread along the page width. How do I do this? Here is my code: \begin{figure}[H] ...
36
votes
2answers
1k views

How can I draw nomograms in LaTeX?

What is a nomogram “A nomogram, also called a nomograph, alignment chart or abaque, is a graphical calculating device, a two-dimensional diagram designed to allow the approximate graphical ...
2
votes
1answer
63 views

pgfplot: how to render 3dplot with colors black, white and gray

I my previous question, I rendered a 3d plot, but as I want to print my plots they should be in black, white or gray coloring format. How should I change the coloring scheme? ...
11
votes
4answers
2k views

How to plot atan(x), sqrt(x) using PSTricks?

For example, this code works: \documentclass{minimal} \usepackage{pstricks} \usepackage{pst-plot} \begin{document} \begin{pspicture}(-5,-5)(5,5) \psgrid[griddots=10,gridlabels=0pt, subgriddiv=0, ...
5
votes
5answers
222 views

How to plot a complicated multi-variable function in a tex document automatically, not just importing an image

I have the following Tex functions and I want to plot them in my tex thesis, but I don't know how. I mean, I want the Tex to draw the function, not just to include an external image to it. ...
3
votes
3answers
144 views

Plotting functions and denoting equation on the figure

How can I plot the functions P=20-1/5*Q and P=5+1/9*Q so as to find the equilibrium point? The figure I need is like the following: Furthermore, how could I put the equation on each ...
4
votes
2answers
198 views

Graph not properly rendered in tikz

I have the following data in data.dat file . TA | OP 6 | 20 17 | 24 18 | 17 19 | 17 22 | 19 33 | 27 19 | 28 13 | 18 24 | 16 19 | 19 9 | 18 21 | 22 16 | 10 19 | 12 ...
7
votes
3answers
813 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} ...
4
votes
1answer
167 views

Plotting hemisphere using tikz

Can anyone help me with the plotting using tikz? I would like to plot the figure below in tikz but I do not know where to start. I have checked the examples given using "ball", yet I cannot find ...
9
votes
3answers
207 views

How can I move a single node in a tikz plot?

I can't find an answer online, please help me. The following plot shows the percentage of 3 groups. The red line is the average (and needs to stay at 13.8). How can I move ONLY the node "2.9" a ...
0
votes
1answer
80 views

How can I align 2 plots vertically?

I have two plots with tikzpicture above each other. (they have quite difficult text files as source, so I can not show them here). The plots have the same width, the problem is that the legend is ...
13
votes
2answers
6k views

How to plot data from a CSV file using tikz and csvsimple?

Here is a minimal example : \begin{filecontents*}{data.csv} a,b,c,d 1,4,5,1 2,3,1,5 3,5,6,1 4,1,4,9 5,3,4,7 \end{filecontents*} \documentclass{article} \usepackage[utf8]{inputenc} ...
3
votes
1answer
70 views

TikZ: Replacing the values (labels) on x-axis with names

I managed to create a simple linear plot with pgfplots-manual (chapter 4.5.1) Now I want to replace the values of x-axis (1,2,3,4) with text, e.g.Test A, Test B, Test C, Test D. How can I do such a ...
0
votes
0answers
50 views

How to draw linear inequalities in LaTeX [duplicate]

I want to draw the following inequalities in LaTeX. This set of inequalities define a region. I want to plot this set of inequalities. How can I do this? I want to achieve something like this. ...
7
votes
2answers
182 views

Why does a plot of a reciprocal function using pgfplots look wrong?

I am trying to plot the function 1/x^2 but the result is obviously wrong, here is how it looks like here is the code \begin{center} \begin{tikzpicture} \begin{axis}[ %xlabel=$x$, ...
1
vote
0answers
54 views

how to create scatter of points?

I am going to teach econometrics soon and as some of you might know, there is this concept of regression where we try to fit a a best plot on the data. I know how to make a graph with just one point ...
3
votes
3answers
233 views

Problem aligning multiple pgfplots due to different axis label sizes

I have two plots that comes back to back in my paper. One of these plots is generated from 1000 data samples while the other one from 320. The problem that I'm, facing right now, is that plots are ...
4
votes
1answer
78 views

How to print without the image

I want to print a document without print the images too: just the position of them so the printer make the process faster (I have some big image and i don't want to spend ink and time to print them). ...
5
votes
2answers
95 views

Nodes near coord overlapping…how to shift up

I am using nodes near coords but as you can see the values on the bottom are overlapping. I have tried placing them manually but that hasn't worked either...How to just shift up the nodes so they do ...
5
votes
2answers
180 views

Fourier Spectrum conversion from 3D to 2D

I am delighted to have the link ORIGINAL LINK However, I have modified the graph to suit my purpose but it's still in xyz-plane. Actually, I want to have the same graph in xy-plane. My MWE is as ...
1
vote
0answers
27 views

Axis Labels for Ridge Trace Plot

I am trying to customize the axis labels for a ridge trace plot but the labels aren't showing up when I compile. How do I get these labels to work? \begin{center} ...
1
vote
0answers
114 views

Incomplete parametric curve, ''written letter e'' [closed]

I have tried plotting some parametric curves like (x^3-3*x,3*x^2-9), and it works fine. The following, however, does not work: (x-x/(1+x^2),1/(1+x^2). I have tried several ways of plotting it but the ...
10
votes
1answer
414 views

Draw a spiral on a sphere

My goal is to visualize damped magnetic precession. Wikipedia features an image, but it doesn't quite capture one essential constraint. Namely, that the magnetization M should be normalized. So the ...
2
votes
1answer
88 views

How to change linewidth for symbols from plotstyle=dots in pstricks?

With the help of plotstyle and dotstyle one can realize scatterplots in pstricks. In the case one selects plotstlye=dots and dotstyle as +, o, otimes or similar one obtains little symbols drawed at ...
4
votes
1answer
142 views

How to add secondary non linear scaled x-axis (1/x) for same data that does not align to linear scale (x) ticks

I want to plot Wavelength and Wavenumbers of one Dataset to one tikzpicture. I found stackexchange: How to have linked axes on plots? but I DONT want to have both axis-ticks aligned to same position. ...
2
votes
2answers
117 views

How to plot BARPLOT in LATEX

I would like to plot Barplot in latex. here is my data..... name S1 S2 john white 912 800 alan ket 484 400 halen koo 309 250 daren kalig 291 280 arif butt 192 ...
3
votes
1answer
131 views

My personal TikZ template to be easily changed

Every time I need to plot a simple function (eg. a parabola), I use a self-made TikZ template that is: \documentclass{minimal} \usepackage{pgfplots} \pgfplotsset{/pgf/number format/use ...
2
votes
1answer
88 views

Plotting .dat file

I'm looking to plot a simple plot with data I've taken from MATLAB in a .dat file format. The file has two columns in the order shown below. I would like column 1 to be x and column 2 to be y. I've ...
5
votes
2answers
259 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
143 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
200 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
136 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: ...
10
votes
4answers
1k views

What is the easiest way to plot a function and its tangent lines at the turning points?

I want to plot graphs like this and embed them as Tikz or Pstricks code in my handouts. I know that there are software such as Ipe, LaTeXDraw etc. But none of them can satisfy me. Because Ipe doesn't ...
1
vote
1answer
80 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
139 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
116 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)}, ...
3
votes
1answer
133 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, ...
1
vote
1answer
101 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 ...
7
votes
1answer
217 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
145 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 ...
9
votes
3answers
470 views

How to draw two intersecting graphs?

I want to make the following figure. My efforts are: \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{calc,shadings} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
4
votes
1answer
331 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 ...
2
votes
1answer
188 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
528 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 ...