Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

4
votes
0answers
499 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
85 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
126 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
60 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
109 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
116 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
109 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
441 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
332 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
270 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
0answers
42 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
39 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
46 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
51 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
60 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
59 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
155 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
52 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
262 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
220 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 ...
1
vote
0answers
207 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
229 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
223 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
382 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
159 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
368 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
131 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
572 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
43 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
57 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
560 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
79 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
800 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 ...
0
votes
0answers
69 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
290 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.