The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [plot]

{plot} is for questions concerned with plotting data or functions using TeX. For questions specific to the pgfplots package, use the {pgfplots} tag.

49 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
572 views

Embed interactive 3d objects in a pdf

I have seen pdf files with interactive objects. For example, objects that you can rotate by using the mouse. I would like to know what such formats can be embedded into a pdf using latex, and how. I ...
4
votes
0answers
2k 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)) plot(college....
3
votes
0answers
81 views

Drawing airfoils from .dat external file

I am trying to include plots of airfoils in my report and have tried using this method: http://www.texample.net/tikz/examples/airfoil-profiles/ Initially, I had multiple errors and the document ...
3
votes
0answers
94 views

pgfplots - filldraw disappears after adding plot

I have some plots in my graph and want to mark a special area with a square. Here's what the plot looks like: \begin{tikzpicture} \begin{axis}[axis lines = left, xlabel = {Player 1}, ylabel = {...
3
votes
0answers
132 views

Conditional plotting with quiver

I am trying to plot two vector fields (x,y) and (-y,x) on a manifold where the norm is given by $x^2 - y^2$ instead of $x^2 + y^2$. Furthermore, I want the vector fields to be only plotted if x>y. ...
2
votes
0answers
54 views

Plotting two functions and their intersection using tikz/pgfplots

I'm new to both tikz and pgfplots, and I am having trouble getting an image of the functions f(n) = 2n^2 and g(n) = 50*n*log2(n) on the same plot. I want the domain to go from n=1 to n=1000, and I don'...
2
votes
0answers
82 views

pgfplots: Best practice to avoid “TeX capacity exceeded” when plotting huge data sets?

I want to create some huge pgfplot with three different axis and a lot of data points. In summary there are 20160 lines of data existent. My problem is: All few hours the values will change ...
2
votes
0answers
126 views

Plotting errors bars with “plot” without using axis environment from pgfplots

In the axis environment of the pgfplots package there is a simple way to add error bars: \documentclass{minimal} \usepackage{filecontents,pgfplots,tikz} \usetikzlibrary{plotmarks} \begin{...
2
votes
0answers
170 views

How to “set format x” to have the format valid with gnuplot+cairolatex

My gnuplot.plt is set up like this set term cairolatex pdf set output "data.tex" set nokey plot 'data.csv' using 1:2 with lines, And I use the output from gnuplot in my latex like this \begin{...
2
votes
0answers
114 views

Inter- and intra-group spacing in bar plots

Can someone help me manage the spaces between bars in a bar plot. I have the following data: 0.0000,0.0001,0.0001,0.0003,0.0006 0.0001,0.0001,0.0003,0.0006,0.0011 0.0001,0.0003,0.0006,0.0011,0.0022 ...
2
votes
0answers
239 views

3D Piecewise function using pgfplots

I would like to know how to draw the discontinuities of a piecewise function, but using the addplot3 (that is, surface). For instance, consider the example here, you can see that the discontinuities ...
2
votes
0answers
488 views

Creating figures from matlab for use in latex (problem: activating legend changes figure size)

At the moment I am creating a lot of figures while writing my PhD thesis. As I am using a lot of Matlab I use the function matlabfrag to export my figure to LaTeX: MATLAB h = figure(1); plot(rand(10)...
2
votes
0answers
364 views

How to draw irregular 3d shapes in TikZ?

I would like to draw the cylinder-like irregular shape displayed below using TikZ. I know how to plot regular cylinders using TikZ, however the commands I know don't apply for irregular 3d shapes, as ...
2
votes
0answers
299 views

LaTeX + Gnuplot on Mac: Plot Not Showing

Right. Total novice here so you might need to go easy. I'm trying to use Gnuplot with TikZ to draw an elliptic curve. Using TeXShop 3.58, Gnuplot 5.0 patchlevel 1... don't know what else is relevant. ...
1
vote
1answer
62 views

How to plot $x^2+y^2 = 4$ and $z=2$ in 3-dimensional space in Latex

I'm trying to plot $x^2+y^2 = 4$ and $z=2$ in 3-dimensional space with axes labels. I came across pgfplot and tikz-3dplot but I could not do it.
1
vote
0answers
49 views

PGF generated plot via Matplotlib and using relative font sizes when input to LaTeX

I can produce plots on matplotlib and export them to pgf successfully. But I believe that by first defining a base font size on matplotlib rcParams (11pt for example), and then defining things like ...
1
vote
0answers
73 views

How can i make a tornado plot?

I am trying to make a tornado plot that shows what the price will become when i change diffrent values, i want the x axis to be like the picture underneath with 77 as my base cost, but i can not ...
1
vote
0answers
41 views

Sum of sub-bars on top of stacked bars in tikz

I want to be able to display the sum of the values on top of the bars. Below is my code and under that, an illustrated image that displays the values I want to show. Can this be done? \documentclass{...
1
vote
0answers
57 views

Placing numbers at the above and right side of the plot frame

I have the following code for a plot. I need to place numbers of x-axis and y-axis in above and the right side of the plot frame respectively. The code is \documentclass{standalone} \usepackage{tikz,...
1
vote
0answers
53 views

Fixing “broken” peaks in 3D plot

I am currently trying to get a nice smooth 3D plot using tikz, however, I am failing to do so in only one case. The complied file is smooth in most areas, yet, in the "peal" areas, the plot gets ...
1
vote
0answers
61 views

Extract one specific value from table/csv to draw an horizontal line

I need to add horizontal lines (asymptotes) to a plot made from a csv file, with the y-axis value taken from this last. I found an example to draw the horizontal lines \addplot [thick,black] table[x=...
1
vote
0answers
70 views

Set size of \datavisualization

I am trying to plot the function using \datavisualization like this \datavisualization [school book axes, visualize as smooth line, y axis={label}, x ...
1
vote
0answers
215 views

TeX capacity exceeded using Knitr

I am unable to weave a document containing LaTeX and R code using RStudio due what I think are TeX capacity limitations. Is there a way of fixing this without having to compile using LuaLaTeX which is ...
1
vote
0answers
55 views

Show “log-”ticks in the case of small range

I use the pgfplots package. Is there any solution to show the "log"-ticks when the range of the data are small? One solution consists in increasing manually the range using xmin, xmax, ymin and ymax ...
1
vote
0answers
293 views

Equivalent to seaborn's heatmap in tikz from csv?

Is it possible to make a neat equivalent to python's heatmaps obtained with seaborn from a csv file? Example file data.csv: ,a,b,c,d A, 50,-300,-200,-100 B, -20,0,100,200 C, 5,300,40,800 D, 3,30,50,...
1
vote
0answers
225 views

pgf file overlap in labels of bar chart

I am trying to import a bar chart I created using python and Matplotlib into my LaTeX document. However when I save the chart as a pgf file and import it into my document there is always a slight ...
1
vote
0answers
243 views

pgfplots 3D plots size versus 2D plots size

I wanted to create a 3D plot but it's not possible for me to set the right size. Should I try out until I find the right values for height and width for the 3D plot or is there an easy way to find ...
1
vote
0answers
834 views

Making a phase portrait of two autonomous system of differential equations with latex

I am trying to make a phase portrait of two differential equations. The equations are: x'=x-y y'=1-x^2 I have tried to google it, and looked in here, but haven't found a sufficient answer. I did ...
1
vote
0answers
230 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
391 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 I'...
1
vote
0answers
171 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?
1
vote
0answers
380 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 ...
1
vote
0answers
139 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 ...
1
vote
0answers
603 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 (...
0
votes
0answers
57 views

problem in using \usepackage{pgfplots} package

I think I have a problem with using \usepackage{pgfplots} package since when I compile any file latex using pgfplots, it fails with this error: ! Text line contains an invalid character. l.232 ......
0
votes
0answers
21 views

Plotting simple CDF graphs

I am working on a homework assignment that requires me to sketch simple cumulative distribution functions and probability mass functions. They are either step functions or discrete points. Can someone ...
0
votes
0answers
70 views

Tikz: addplot error using pythontex

Please, help solve this issue. The python code have the objective of calculus the derivative of an expression f(x). If I uncomment the line %\addplot [domain=0:10, samples=100, color=blue ]{\pyc{...
0
votes
0answers
112 views

Cannot plot from files anymore after re-installing Miktex

I have recently re-installed Miktex and I cannot plot form a file anymore that compiled before re-installing it. The following code \documentclass{article} \usepackage{tikz} \begin{document} \begin{...
0
votes
0answers
63 views

how can I plot this with Tikz

I want to use Tikz to draw the image below, I have data for the values of x, y and u/u_b
0
votes
0answers
24 views

pgf matrix plot mask values in colormap

I would like to make a matrix plot with the following script, where all 0 values are displayed in white all other values according to the colormap. Is there a masking feature in pgf plot? Could it be ...
0
votes
0answers
27 views

Matlab plotting symbols

Is there a set of commands that I can use in latex to reproduce the plot markers used by MatLab? So far I am using $+$, $\bigcirc$, $*$, $\cross$, $\square$, and $\diamond$. The $*$ symbol is ...
0
votes
0answers
57 views

Matlab2tikz // Error divsion by 0.0

I created a minimal working example in Matlab: [x,y] = meshgrid(-2:0.1:2,-2:0.1:2); fx = x.*y; fy = x.*y; figure quiver(x,y,fx,fy) matlab2tikz('plot.tex'); This works great and creates the plot....
0
votes
0answers
121 views

plot a data file as a contour plot in a specific region

I have a set of data and want to be plotted in a specific region. I draw the region using tikz and when I want to add the data as a contour plot in the region, I don't get the results. How can I Plot ...
0
votes
0answers
40 views

The scale of the X-axis bar is far away

I am attempting to create a box plot with very large numbers(using tikzpicture), so I expect their to be smaller numbers on the X-axis but the scale denoted on the graph. THe problem is that scale is ...
0
votes
0answers
710 views

EMF figures in LaTex

I am slowly learning and shifting to latex. Figures I have produced till now are all .emf format and now I am unable to load them into latex. Kindly suggest what could be done. Please do not suggest ...
0
votes
0answers
83 views

How to draw a 3D plane, whose coordinates must also obey an inequality?

I'm trying to plot the plane x+y+z=0 subject to the constraint x < y < z. This should yield a triangular plane that extends out from the origin. I don't understand how to render this in tikz-...
0
votes
0answers
71 views

strange results when plotting a function that i declared

I've declared two functions, the first of which (Gamma) works fine, but the second gives me really strange results that aren't right (after checking in excel). I've tried changing al the parameters ...
0
votes
0answers
331 views

How to create tikz figures via knitr forcing labels featuring LaTeX's font size modifier-commands?

Is there a way to force knitr to create tikz code which includes font size information? The output would be something like this: \begin{tikzpicture}[every node/.style={font=\footnotesize}] Here is ...
0
votes
0answers
93 views

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

I want to make this graph. I have only excel data.