{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

0
votes
0answers
54 views

A question on consistency of fonts in figures and in text [duplicate]

Suppose I output a figure of some function from Matlab, without adding the x-axis label and y-axis label. The figure is then saved as a PDF file. Now I want to input this figure into LaTeX, and I ...
5
votes
1answer
519 views

Plotting a 2D gaussian sample

Can you please help me with making a 2D Guassian sample with specified means and variances? I only know how to make a guassian curve :D \documentclass{article} \usepackage{paralist,pst-func, ...
3
votes
1answer
192 views

Pgfplots: How to make the plot exceed the axes

I am plotting a spike using pgfplots. I want to make the y-axis until (4) only. However I want the plot of the spike itself to continue beyond the y-axis (say until 10). Is there a possible way to do ...
3
votes
1answer
662 views

How to draw industry schematic diagram in LaTeX?

Is it possible to create the following diagram in LaTeX ? I am interested in the main body, any colour inside the box is fine.
4
votes
1answer
624 views

pgfplots: Points with no marks but errorbars?

How can I plot data points with pgfplots that have no marks, but error bars? If I try marks=none and enable errobars, I get big filled circles with errobars. If I change my mark to mark=+, for ...
6
votes
2answers
454 views

Rindler coordinate chart (family of parametric curves) in TikZ

Is it possible to make a plot like this with TikZ or other drawing packages? This plot visualizes a two parameter family of curves, given by T = x Sinh(t) X = x Cosh(t) The pink curves are ...
3
votes
5answers
424 views

How to write ‎y = (x / 6) ‎^ {3 / ‎7} in TikZ format to plot its graph?

How to write y=(x/6)‎^{3/‎7} in TikZ format to plot its graph in the following code? ‎\documentclass{article}‎ ‎‎\usepackage{tikz‎}‎ ‎\begin{document}‎‎ ‎‎\begin{tikzpicture}‎ ‎\draw ...
7
votes
2answers
509 views

How to plot a discontinuous function curve and diagram of Markov chain with TikZ?

Please apologize my ingnorance of tips to use for asking questions. I would like to realise the plots and the diagram like those shown on page 158, 160 and 161 on this document Chaine de ...
5
votes
1answer
188 views

pgfplots: Read expression from file

For my lab reports I often have to do complex fitting and transformations to my data (like fitting cauchy distributions or FFT). Fitting with gnuplot sometimes fails and including it directly in the ...
5
votes
2answers
327 views

plotting graphs with dspPlot functions

I have tried plotting graphs with dspPlot as explained by Prof. Paolo Prandoni and Prof. Martin Vetterli in their site but failed. They have run the following code to generate curve in their DSP book ...
3
votes
1answer
955 views

Bell curve with multiple x-axes and annotations

I've just started working with pgfplots and I'm getting good results, but I'm having difficulties getting this one done in LaTeX: The curve itself is not a problem, but the multiple x-axes (I don't ...
2
votes
0answers
222 views

Scatterplot with TikZ/pgfplots [duplicate]

I have 7 *.txt files each with 2 columns of data thus: time(mins) contacts 3.25 8 1.166666667 4 3.2 6 3.2 7 2.25 8 5.466666667 12 2.25 3 2.166666667 7 I'd like to plot them in separate ...
3
votes
1answer
242 views

tikz does not plot correctly

@Jake: this is the whole document \documentclass[11pt, a4paper]{book} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \usepackage{tikz} \usepackage{pgfplots} ...
4
votes
1answer
195 views

Join point by using Tikz in Beamer document class

I know my question is trivial. By the way, I can not show points given by their coordinates with a Bezier curve using Tikz. \documentclass{article} \usepackage{tikz} \begin{document} ...
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 ...
7
votes
2answers
2k views

Easy creation of logarithmic grid with TikZ

Is it possible to create a logarithmic grid using the command below with TikZ? \draw (-0.1,-0.1) grid (4.1,4.1); It would be great to be able to create a logarithmic grid without having to specify ...
9
votes
3answers
571 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: ...
9
votes
3answers
482 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} ...
0
votes
1answer
1k views

Quality of R plots in LaTeX [closed]

In R, I use par to prepare four boxplots (using boxplot) as a single image, which I save with the png() command. This image is included in a LaTeX document with \includegraphics. I have experimented ...
8
votes
1answer
353 views

how to draw plots without data in tikz?

I want to draw this plot. I know how to do it with data. But here I don't have any data. And I want to draw this. How would I do it?
3
votes
1answer
803 views

How to run gnuplot/latex from inside texshop?

I was able to write a piece of code that drew a graph in gnuplot and then using tikz embedded that into my TeX document and run it via Texshop. I am not able to do that anymore. I need to run ...
5
votes
1answer
608 views

how to create an histogram with a string label using pgfplots?

Dear i try to generate an histogram / barplot result.csv: overlap,hit,organism 100,274,Unknowns 100,228,Coccomyxa subellipsoidea 100,11,Eukaryota -500,153,Unknowns -500,145,Coccomyxa subellipsoidea ...
7
votes
1answer
334 views

How to draw dash-dotted curves using MetaPost?

Is it possible to (easily) draw dash-dotted curves in MetaPost, i.e. curves that alternate between a dash and a dot? For either dashed or dotted curves, I use the draw command and end it with dashed ...
2
votes
1answer
76 views

Plots going to the wrong page [duplicate]

Possible Duplicate: Keeping tables/figures close to where they are mentioned In the end of a section, I added two plots and. So, I finished this section and started a new one. However, this ...
2
votes
1answer
143 views

Multiple plots under a same caption error

I want to plot multiple figures under a same caption but the code doesn't work. This code doesn't appeared in plot: \begin{figure}[htp] \centering \subfloat[a]{% ...
1
vote
2answers
191 views

Multiple Plot query under a same caption with different labales problem [closed]

I have 6 figures and I want to plot them under a same caption with different labels. I have tried two codes for plotting but they are not working. Codes: \begin{figure}[htp] \centering ...
11
votes
1answer
2k views

pgfplots - Placing Nodes on x Coordinates of a Plot

I want to plot some graphs in pgfplots and want to place nodes on the exact same x coordinate of the plot. The position of the note has to be set in x direction but free in y direction. Here is one ...
0
votes
1answer
436 views

Winbugs plots in latex

I conducted a bayesian analysis and obtained some plots in winbugs. Does any one how to put the history graphs in WinBUGS in Latex? I could not save the plots as pdf.
8
votes
1answer
268 views

Tikz plots distorted mark

Consider the following code: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{plotmarks} \begin{document} \tikz{\draw (0,0) -- plot[mark=o] (0.5,0) -- (1,0);} \end{document} It seems ...
4
votes
4answers
2k views

Multiple subfigures not appearing on the same line

Multiple figures under a single caption. I have tried a code to put two images in a together under a same caption. The subfigures do not appear on the same line. The code is : ...
9
votes
1answer
815 views

Plot functions and their point of intersection

We are plotting three functions as follows \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[enlargelimits=false] \addplot[domain=0:1,blue] {(1-x)/5}; ...
8
votes
1answer
915 views

Pgfplots contour gnuplot crazy labels

This is driving me mad. I am tryng to create some contour plots, but I get them full of labels, so that they are unreadable! I can't even see the lines or read the values because they are too much. I ...
5
votes
1answer
780 views

Scaled ticks with ymin and ymax

For a publication I am preparing multiple plots with PGFPlots and would like to have them all look alike, i.e. having the same axis and identical ticks. For this I intended to use ymin and ymax, but ...
0
votes
0answers
77 views

Is there any good XY plot tools using latex [duplicate]

Possible Duplicate: Comparison of plotting packages? Let us say I have x-axis data and the corresponding y-axis data. I was wondering if latex had any graphing abilities. I might want to ...
4
votes
0answers
77 views

LaTex Pgfplots Two axes 1 legend [duplicate]

Possible Duplicate: Using a pgfplots-style legend in a plain-old tikzpicture I'm trying to accomplish this: I have a plot with two y-axes. The first y has two plots, the second has one. I ...
22
votes
3answers
2k views

How can I make plots with TikZ which look like the new Mathematica 9 plots

The new Mathematica 9 is out! I would love to know how to make similar plots to the one's advertized, particularly the following: and Here is a simple plot to get started. %& -shell-escape ...
14
votes
2answers
7k 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} ...
5
votes
2answers
350 views

How to plot the graph below?

May I know how to draw the graph as shown below? below is a code I have try but with look and feel that is quite far away from the example: \begin{tikzpicture} \begin{axis}[ legend pos=north ...
6
votes
3answers
373 views

Calculate function with integers as input and plotting

I'd like to plot the function 1/2*x(x+1) in for integer values ranging from 3 to 20 and in particular I'd like the function to be plotted in those points. I have managed to create the following graph ...
17
votes
1answer
1k views

Drawing timeline

I have a dataset which consists of repeating events over time. Each event takes an arbitrary amount of time. I could plot this using gnuplot but am unable to produce correct keys because of the ...
12
votes
1answer
1k views

Plot non-continuous function with TikZ

How can I plot a non-continuous function with TikZ (using continuous lines for continous stretches of the function and dashed lines for discontinuities)? Does anybody know an efficient method?
9
votes
2answers
651 views

pgfplots plots function not correct

This code \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis} \addplot [domain=15:30, samples=1000] ...
4
votes
1answer
371 views

pgfplots: how to set default number of samples?

For most of the functions I have to plot with \addplot of pgfplots, I have to set [samples=200] to make them look smooth enough. I was wondering if there is some option to set the default sample ...
3
votes
2answers
119 views

What is an appropriate way of plotting a number as a function of year?

I am trying to plot a certain number as a function of year for different entities. In this example, it is the number of missions to the Moon for different agencies per year. What I have come up with ...
231
votes
2answers
26k views

Create xkcd style diagram in TeX

The unique style of the diagrams at xkcd has an informative but nice hand-drawn touch. I guess they are actually drawn by hand but just recently on our partner site for Mathematica someone asked how ...
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, ...
3
votes
1answer
287 views

Curve synthesis - Adding many (mostly piecewise linear) curves

It's a follow-up to a previous question. If I could have a macro out of the solution over there, it would have been great but then I couldn't make it. The following code (to be added to the one in ...
9
votes
1answer
504 views

Curve synthesis - Adding two curves to get another one

Case 1: Let's say I have a few coordinates (A), (B), (C), (W), (X), (Y), and (Z) (possibily obtained through intersection, rotation, and whatnots). I draw two piecewise linear curves through (A), ...
7
votes
1answer
1k views

Draw outside axis with pgfplots

I have the following diagram, and would like to extend the red line so it crosses the axes and goes on for a bit at the start and the end like in the second picture, but I would like the red and blue ...
6
votes
1answer
653 views

Making the y-axis range of a plot have more values in some parts

For the MWE below: \documentclass{report} \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{pgfplots} \begin{document} \begin{figure}[H] ...