{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
25 views

Gnuplot for Graphics from Octave. How to set size IN OCTAVE?

I am using Octave for all my calculations and plotting. By telling Octave graphics_toolkit gnuplot I can create a *.tex-document by print -dtikz filename.tex Which I can then use by ...
5
votes
2answers
63 views

sinc function amplitude wrong in pgfplots

It seems that pgfplots has a problem with plotting the sinc function, aka sin(x)/x. Why is the amplitude wrong? It should be 1 at x=0. As to my knowledge the y-scale is nonsense (compare ...
8
votes
1answer
123 views

Visualize singular vector fields with TikZ or PsTricks and friends

I am trying to find a good way to make really visually appealing plots of singular vector fields. For example electric fields of point like charges. I already tried this in python without too much ...
2
votes
0answers
19 views

Is there a way i can make psfrag replace every number in a plot?

I want to replace every number in the axis of a plot. Can psfrag do this? If not, is there any other tool i can use to get the same effect?
2
votes
1answer
23 views

Is there some way i can edit a Octave eps and send it to LaTeX to be edited with psfrag?

I want to cut just a part of a eps plot made with Octave (its colorbar) and send it to LaTeX, still being able to use psfrag with it. Is there a way to do it?
2
votes
2answers
136 views

How to plot this beautiful figure

I have to plot a figure in my paper, but I find problems in doing it (see below), can you give me some tips? Some code (either LaTeX or Matlab) will be helpful.
1
vote
1answer
33 views

how can plot mesh from a data file?

i want plot a 3d mesh plot from a data file .the tex file can be run but it's output is wrong. please help me. \documentclass{article} \usepackage{tikz, pgfplots} \usepackage{pgfplots} ...
3
votes
1answer
50 views

pfgplots plot in degrees

Everywhere on the web, and in this forum, tells me pfgplot plots trig functions in degrees, which is what I'm after. Here is the code for my graph: \begin{figure}[H] \centering ...
-1
votes
0answers
20 views

making two plots into one graph and fit it into an APS journal format [closed]

I have been working on an APS journal on sharelatex. I need to insert a graph there in .png format. I have plotted graphs in Desmos so far, never used matlab or matplotlib. Now i see the graphs are ...
0
votes
1answer
154 views

Drawing gamma function in LaTeX

Is there an elegant way to plot gamma function (or some similar non-elementary function), http://en.wikipedia.org/wiki/Gamma_function via TikZ or pgfplots? The graph I have in mind is something ...
3
votes
1answer
134 views

plot a rational function with TikZ

I am trying to plot a function but something is incorrectly written... Could anyone please help me? \documentclass[12pt,a4paper]{article} \usepackage{amsmath, tikz} \usepackage[margin=3cm]{geometry} ...
0
votes
0answers
43 views

central and non-central chi square distribution in one plot with tikz

What I want is to draw a chi square distribution - both a central and non-central into one plot and draw parts of the surface underneath as solid color. Note: I read Plotting the chi square ...
3
votes
0answers
51 views

Uniformly spaced line markers

I'm reading line data from file and plotting it. By default, the curve has markers, where are the original data points. The data points are very uneven, but I would like to have evenly distributed ...
0
votes
1answer
57 views

How to plot time intervals? [closed]

This is not a LaTex question but might be relevant to people in here. Does anyone know how can I plot time intervals. I am interested to plot some thing like this but I don't know how. I prefer to use ...
0
votes
0answers
76 views

MATLAB plot legend subscript in text mode required in non italics

I have used the legend of the plot in a LaTeX intrepreter. The subscripts {mic} require non-italics or text mode. However, for the below code I have used this and I obtained italics. Any solutions for ...
1
vote
0answers
35 views

plot matrix with epslatex

When plotting a data matrix with the plot command and epslatex terminal the generated image is correct. However, the generated latex file outputs also the source path, i.e. 'Date/data_file.txt'. Any ...
2
votes
2answers
70 views

using mathematica plots in LaTeX

I would like to use plots created with Mathematica inside my LaTeX environment. Is it possible to plot the Mathematica code completely inside the LaTeX environment? If it is not possible, does anyone ...
6
votes
1answer
118 views

PGFplots: How to add a legend to “superimposed” plots

I have "superimposed" different plots on the same graph (i.e., I have two axises environments in one tikzpicture environment.) Now I would like to add a single legend for both of the plots and ...
0
votes
1answer
78 views

How do I create a certain graph using pgfplots?

I can't create this graph or something similar to it. I use pgfplots for plotting.
4
votes
1answer
114 views

Convert image to code (TikZ? PSTricks?)

I have a ... pdf file, which contains figures of plots such as the following: Now the second plot isn't too hard to draw on TikZ (I assume... I hope? I don't have any experience apart from ...
1
vote
1answer
106 views

Plotting a chart and chart line?

How I can Plot this curve in Latex {revtex4-1}? \begin{center} \begin{tikzpicture} \begin{axis}[bar width=18pt, xtick=data,ymin=0,ymax=45,x tick label style= {rotate=90,anchor=east}] \addplot[ybar] ...
2
votes
3answers
118 views

Plotted line in tikz stops in middle of grid

The plotted line stops and doesn't go on till the border of the grid: This is my code: \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \begin{document} ...
6
votes
1answer
80 views

Equivalent to “shorten <=” for intermediate points

Halo everybody, I try to plot a data set using tikz & pgf. I want that the points in the plot are connected, but the line shouldn't touch the points. I can achieve this for the first and the last ...
4
votes
1answer
76 views

Graph doesn't stay within grid

I've plotted two simple functions in Latex using tikz. It looks like this: As you can see, the curve doesn't stay within its grid. How can I fix this? This is my code. I'm using documentclass ...
3
votes
1answer
145 views

Complex function plot using TikZ or PGFPlots

I need to plot some steps of this approximation http://mathoverflow.net/a/27127 but don't know how to start.
1
vote
1answer
64 views

How to make this bar plot visible?

I am trying to visualize about 21 data points, each which gives a different value for 3 different tasks, so there are 63 unique values to plot. I have tried using pgfplots colored bar plot, but I ...
5
votes
2answers
299 views

How to draw 3d vector field on a line?

How to draw 3d vector field on a line? I want to visualize the vector field $( m_x(x), m_y(x), m_z(x) )$. After searching "visualize vector field", I find that most plotting software either plotting ...
1
vote
0answers
20 views

Vertical spacing in tabular environment with graphs/math

I have problem getting this to look nice. I need help with spacing and alignment of text: \begin{tabular}{lll } \toprule \multicolumn{1}{l}{Activation Function} & ...
1
vote
0answers
46 views

Force Knitr Figure on same page

I am using Knitr on RStudio. <<glmall, include=TRUE, fig.align='center', fig.cap='Diagnostics plots for full-model with GLM (Poission)', fig.show='asis'>>= par(mfrow=c(2,2)) ...
2
votes
1answer
38 views

Undefined error when plotting from data

I have been trying to create a LaTeX plot for my own data. To get me started I have copied the code from this website (ShareLaTeX) into my TeX editor. All the graphs come out exactly like they look on ...
1
vote
0answers
24 views

draw plot \x^2, sign error [duplicate]

I try to plot quadratic fonction. \documentclass{article} \usepackage{tikz} \begin{document} bad, negative square equal...negative! \begin{tikzpicture} \draw plot (\x,\x^2/4/1.0); ...
6
votes
2answers
311 views

drawing smooth path through symmetric points, gives non symmetric curve

I want to make a graphic going through some points. I've choose the points symmetric, to have a symmetric curve, but the curve is not. I could define some extra points, but their must be a better ...
2
votes
2answers
153 views

drawing convex envelope of a function

I am writing an introductory chapter to my thesis report. I want to add a figure that illustrates the convex envelope of a function no matter what function, though, it has to be continuous. I'm not ...
2
votes
0answers
56 views

Creating Tikz Legends in the Caption

i'm having a few issues with creating a legend in the caption of an image. I've made a lot of graphs using matlab2tikz and i've externalised them to reduce my compiling time and memory usage. ...
6
votes
2answers
107 views

Scale the Axis in Tikz

I have the following problem: \begin{center} \begin{tikzpicture}[scale=0.5, >=latex] \draw[->] (-6,0) -- (6,0) node[right] {\scriptsize $x$}; \draw[->] (0,-5) -- (0,15) node[above] ...
4
votes
1answer
523 views

Scatterplot with data from CSV file and trendline

I have created a scatterplot with code from this previous asked question. \documentclass[varwidth=true, border=2pt]{standalone} \usepackage[utf8]{inputenc} % this is needed for umlauts ...
2
votes
1answer
107 views

How can I make concentric circles as grid for a polar plane?

But I need to delimitate the circles for x, y in [-2,6]. \begin{tikzpicture} \draw[yellow!10, fill=hkvbluelogo!5](-2, -2) rectangle (6, 6); \foreach \s in {0, 1, 2} { \draw [lightgray] (0,0) circle ...
0
votes
1answer
35 views

Plotting with literals

I can plot functions with numbers using pgfplots but how can I plot something like the next image? The curved part corresponds to an exponential with negative argument.
3
votes
1answer
116 views

Tikz - Rotated Gaussian

I would like to plot a rotated curve (gaussian) but I've got no idea how. I searched in the internet and found that I have to define the gaussian curve because it's not included. But how can I plot ...
7
votes
3answers
322 views

How can I plot the F distribution

I wish to plot the F distribution by declaring its density function. However with the following code I get an error saying that fdst has not been declared: \documentclass[border=5mm]{standalone} ...
6
votes
1answer
147 views

Plotting multiple lines with a colormap in pgfplots

I have a similar question to Steve Hatcher from this thread: Spectrum colormap for multiple curves I have a data file (mwe_data.txt) which contains multiple columns. The first column is the x-axis, ...
1
vote
1answer
136 views

Tikz plot not precise enough

In the plot pictured below the two curves should cross at (4,3) but they do not. Is there some way to fix this? I tried to load the fixed point arithmetic library hoping to increase precision but the ...
4
votes
1answer
161 views

Plot a linear function with pgf plot?

Hi I would like to plot a graph of load voltage vs load current, I have been trying to do it with a tikzpicture, but wonder if maybe it can be done with a tikzplot? The bellow code is sort of what I ...
0
votes
1answer
33 views

how to make a plot with consecutive numbers in x and y axis?

I made this plot but I want consecutive numbers from 1 to 10 in the labels for the x and y axis. The current plot shows 0 then jumps to 5 and 10. \tikzpicture \begin{axis}[ axis y line=center, axis ...
5
votes
3answers
631 views

How to generate a simple cartesian plane system?

I need to make a cartesian plane for plotting the straight line joining the points (-3,1) and (6,-2). This is a very simple cartesian plane plotting. When I looked at the manual for tikz the graphics ...
6
votes
3answers
332 views

tikz plot of two sine waves, showing the phase difference

What I am trying to achieve here is to plot two sine waves, and with some dotted lines on the peaks showing a \Delta t in the middle, as the phase difference. Any help appreciated.
1
vote
0answers
77 views

What do you use for plotting? [closed]

I use Latex now for about two years and have written a couple of larger documentations with it. When it comes to plotting (simple or complex, functions or data) I used gnuplot or R. The later more and ...
0
votes
0answers
93 views

Visualizing Cluster Data

the question in the headline is formulated very abstract, because I am still not sure what the best way of visualizing the Data I have is. The problem is that I have two mappings of a dataset which ...
4
votes
1answer
84 views

Changing axes' origin adds weird whitespace

I would like to display points in a Tikz picture, whose y components are all negative. That is per se no problem, but I want the y axis to be a bit higher than the x axis to emphasize the negative ...
4
votes
1answer
121 views

Draw plots with tikz

I would like to do the following graphic in tikz. But I do not konw how to proceed... How could I do that? EDIT So far, I have tried simpler things (before getting to this bigger problem). I have ...