Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

(pgfplots) How to plot every Nth entry from a large CSV file? [duplicate]

I have a large csv file (20,000 entries) and I am having compiling issues. I figure a good way to solve this is to skip certain entries e.g. plotting only every 100th entry. However I am unsure how to ...
mathematurgist's user avatar
0 votes
1 answer
40 views

How to make a bold Z

\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} % Define the outer Z \fill[white, draw=black, thick] (-2, 2) rectangle (2, 1); \fill[...
user1942348's user avatar
  • 1,101
0 votes
0 answers
21 views

Pgfplots mesh is being rendered with one line only

I am trying to plot a mesh 3d plot with pgfplots, but it is rendering in a way witch is strange in my opinion. It looks lik it's using only one line zig-zagging and so it's difficult to see the graph. ...
André Bueno's user avatar
2 votes
1 answer
35 views

Understanding Spiral Function (potentially 3D) for tikz

I am trying to create a tikz diagramm that shows the precession movement of the LLG equation. Here is an example from wikipedia: So far I have managed the spiral and centre arrow like this: \begin{...
Matis's user avatar
  • 33
0 votes
1 answer
28 views

Using Latex with two plots next to each other error with subfigure

i am running the following code: \begin{figure}[htbp] \begin{subfigure}[b]{0.48\textwidth} \centering \begin{tikzpicture} \begin{axis}[ axis lines=left, ...
SebNik's user avatar
  • 101
1 vote
1 answer
42 views

Colormap along the line curve rather than the axes

Using data from a file, I would like to color the line curve using a custom gradient. However, I would like the gradient coloring to span the line curve rather than the axis. To better illustrate the ...
Meclassic's user avatar
  • 1,827
5 votes
2 answers
291 views

Use for loops to generate TikZ coordinates corresponding to linear combinations of vectors

I am trying to draw linear combinations of vectors. I started defining coordinates manually, but it's too time- and space-consuming: \begin{center} \pgfplotsset{compat=1.15} { ...
EthanAlvaree's user avatar
  • 1,421
1 vote
0 answers
39 views

Plot the fractional part function

To plot the fractional part function f(x)=x-floor(x), I use the following code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.17} \begin{document} \begin{center} \begin{...
Dimitris's user avatar
  • 1,561
1 vote
0 answers
34 views

tikz: remove the * 10^4 at the end of the xaxis [closed]

im plotting a tikzpicture and want to remove the annotation at the end of my x-axis. (*10^4) do you know how to fix it? here is my tikzplot: \begin{tikzpicture} \definecolor{darkgray176}{RGB}{176,176,...
Andre's user avatar
  • 11
2 votes
1 answer
50 views

How do I avoid 'TeX capacity exceeded' error, even though I have a small dataset?

I'm trying to make a scatterplot of some measurement data, which is only a <100 datapoints. So here is my code, hopefully you can help me solve this issue: \documentclass[12pt]{article} \usepackage{...
Benzv2001's user avatar
0 votes
1 answer
64 views

Scatter plot with discontinuity

I have a lot of these scatter plots to produce. I am not able to get the discontinuity correct on both axes an line up labels on both axes My MWE \documentclass[tikz, margin=3mm]{standalone} \...
Jon's user avatar
  • 539
1 vote
1 answer
60 views

Fine tuning: TikZ, pgfplots and Lennard-Jones potential

I'm trying to recreate a faithful copy of the graph shown here. I'm trying and trying again, but I would like to make the curve tend to infinity more quickly for x=0 and tend to 0 more quickly for x=...
user3204810's user avatar
  • 1,539
0 votes
2 answers
36 views

Plot the graph with labels

\documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ title={Effect of Positive Checks on Population}, xlabel={Time}, ylabel={...
Botho Chinga's user avatar
1 vote
1 answer
80 views

Graph hardly readable - pgfplots options difficult

I am trying to create a plot representing the number of articles about resilience over a period of time. The data comes from a txt file, looking like this: Publication Years Record Count % of 141519 ...
Orsu's user avatar
  • 113
2 votes
1 answer
53 views

Fill area under curve points

So, I have this code and I need to fill area under curve points. How can I do that? a) First, I need to fill area under curve points from x = 1 to x = 5 b) I need to complete fill area. Thanks. \...
Pedro Salgado's user avatar
3 votes
1 answer
75 views

Addplot messes with axis coordinate system?

I am trying to understand why the direction of the red arrow changes in the presence of the addplot line in the following example: \documentclass[]{standalone} \usepackage{tikz,pgfplots} \pgfplotsset{...
mimuller's user avatar
  • 872
-1 votes
1 answer
243 views

Draw several cars with TikZ and and special style arrows

I need help to get the updated result below I have drawn several cars with this code: \documentclass[border=10pt]{standalone} \usepackage{tikz} \tikzset{ pics/my car/.style={ code={ ...
mzn's user avatar
  • 333
4 votes
1 answer
74 views

Plot is being drawn on layer below gridlines

I'm having an issue with the order of layers in the second figure. In it, the lines and patterns for the plots are drawn on a lawyer below the gridlines. Whereas the first figure's line and markers ...
Mearman's user avatar
  • 43
1 vote
1 answer
60 views

LaTeX tikz plot command, Missing number, treated as zero. <to be read again>, with complicated function

I would like to plot some physichs diagram with the plot command in LaTeX. However i ran into multiple issues during my journey, and im currently stuck. Maybe i am pushing the limits on tikz's ...
Döme Kálmán Sarus's user avatar
5 votes
2 answers
414 views

curve of x*e^(1/x) - e^((1-x^2)/x) - x - 1 on [0, +\infty[ tikz

I constructed the curve of the mentioned function but it is not displayed correctly. \documentclass{standalone} \usepackage{pgfplots} \usepackage{amsmath} \begin{document} \begin{tikzpicture} \...
Dots's user avatar
  • 429
1 vote
1 answer
76 views

Circle with a center mark and legend label in pgfplots

I'm trying to draw a circle in pgf plot with a + mark at its center. right now I have this code: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \...
Xaser's user avatar
  • 169
1 vote
1 answer
45 views

Plotting cdf of binomial distribution with pst-func

I found the amazing pst-func package for plotting various mathematical functions including the cdf of a binomial distribution. With XeLaTeX I can compile (for example in OVerleaf): % Requires XeLaTeX, ...
Jakob's user avatar
  • 1,003
1 vote
1 answer
77 views

Adding an arrow to the graph of a function

I'm making a thermodynamics PV graph to show how a cycle progresses and ideally I'd need to add arrows going along the blue line going left, the red going right and the green going up. But I cannot, ...
Emmannuelle_Legolas's user avatar
0 votes
1 answer
52 views

Plot from data, and linear regression

I used gnuplot to plot this data 0.20 0.41 0.40 0.67 0.75 1.10 2.35 2.20 1.35 1.45 0.25 0.26 1.20 1.22 This is the code set xlabel "t" set ylabel "ln{{T_n-T_e}{T_w ...
Maroon Racoon's user avatar
0 votes
1 answer
53 views

Plotting a PV function graph

I'm trying to plot the following graph in LaTeX, but I cannot, for the life of me, find mathematical functions that work. This is my code and the following image is what I'm trying to achieve: \...
Emmannuelle_Legolas's user avatar
0 votes
1 answer
30 views

Join coordinates in 3d plot using pgfplots

I am trying to join two coordinates (nodes) within a 3d plot using pgfplots. The problem that I am facing is that the joining line is not even touching the endpoints. I am guessing that the line is ...
Meclassic's user avatar
  • 1,827
3 votes
1 answer
80 views

How to place a figure near a matrix?

I am looking for a way to place the figure next to the matrix, with the matrix numbered (1) And name the figure with the corresponding graph to the matrix (Fig.1: corresponding graph of the matrix (1) ...
Emad kareem's user avatar
1 vote
1 answer
51 views

How to make to fix the x-axis interval of this bar graph and make it look like the following graph?

Here is the bar graph I'm trying to copy (not numbers just the graph), And here's my attempt, And here is the code, \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{...
Abdulrahman's user avatar
5 votes
2 answers
267 views

Draw tangent line on a curve

I would like to draw a tangent line on (x0) which is an intersection between vertical line and the red curve, this is my code \documentclass[tikz,preview,border=1mm]{standalone} \usetikzlibrary{calc,...
Hariz Khaled's user avatar
0 votes
1 answer
87 views

Creating a Brownian motion plot with many trajectories including the expected value

I'm trying to replicate the Brownian motion plot found on the cover of Bernt Øksendal's textbook Stochastic Differential Equations using LaTeX. I'm a bit lost in the coding. No math is needed. I've ...
Jessie's user avatar
  • 255
8 votes
4 answers
651 views

Creating a half-life plot

I'm trying to replicate the below plot in LaTeX, but I'm a bit lost in the coding. No math needed. It's just an exercise to create generic plots which resemble an exponential decay. I'd like to ...
Jessie's user avatar
  • 255
0 votes
1 answer
72 views

figure of network

I want to plot this figure and this is my code and result. I want the size of the blocks and their distance to be the same as the original figure. In addition "network" should be inside the ...
mzn's user avatar
  • 333
-2 votes
1 answer
55 views

plot stability region

I want to plot this figure and this is my code and result. I want the vertical line that I marked in the figure to be removed and also the point $q pi/2$ to move away from the arc and not stick to it ...
mzn's user avatar
  • 333
0 votes
1 answer
72 views

How get a very high quality image of the plot

I am using texstudio. Q1: I want to convert the pdf output to high quality eps file. How to do that? Q2: Is it possible to increase the quality of pdf output also, if I replace the 1st line of the ...
user1942348's user avatar
  • 1,101
1 vote
0 answers
53 views

Commutative diagrams for a blog

I have been lately dabbling with the thought of relaunching my math blog. I want to cover category theoretical related topics, and thous would like to be able to plot. I found this blogpost, however ...
Kind-Distribution376's user avatar
0 votes
0 answers
100 views

Tikzplotlib not outputting Matplotlib's PyPlot colour bars

I'm trying to output contour plots made with PyPlot to Tikz using Tikzplotlib, but the color bars aren't appearing in the outputted TeX code. The contour plots themselves aren't appearing either ...
TheorVHP's user avatar
0 votes
0 answers
38 views

How can I make two plotted functions overlap?

In this picture I want the two Gaussians to overlap each other: Here is a minimum working example: \begin{center} \tikzstyle{hidden}=[circle,fill=white!25,minimum size=120pt,inner sep=0pt, ...
Ahsan Yousaf's user avatar
3 votes
2 answers
115 views

Tell pgfplots not to try to plot where the function is not defined

The following code raises error because the function is not defined on part of the domain (e.g. acos cannot have its argument greater than 1): \begin{tikzpicture} \newcommand{\myfunc}[1]{acos(cos(...
Ulysses Zhan's user avatar
1 vote
0 answers
63 views

How to plot broken axis in overleaf? [duplicate]

I need to plot the following points in a plot: There is an outlier in Method 7, and hense I need to draw a broken y axis in the plot. How do I do it? in the x axis, it should be [1, 2, 3, 4, 5, 6, 7, ...
Hasalanka Nagahawaththa's user avatar
0 votes
3 answers
131 views

A proper plot of this function with TikZ

Here I am to ask for your help again. I need to plot with TikZ the function $\frac{1}{x+2}$, highlighting the vertical asymptote at $x = -2$. I would like to draw the vertical asymptote in dashed ...
Henry's user avatar
  • 402
0 votes
3 answers
65 views

Coordinates not plotting correctly

I am trying to create the figure (attached), but when I do, my points are not plotting correctly. For example, (0,2), plots (0,-1) (or very close to it). I am not sure what I am doing wrong. I ...
Nick B's user avatar
  • 937
1 vote
1 answer
78 views

Trying to plot using tikz

as usual I feel stupid because I feel that it should be easy but... well here I am... I want to plot this function using tikz : x/3.6 + (x^2)/155 So I tried this : \documentclass{scrartcl} \...
Kawahiem's user avatar
0 votes
1 answer
37 views

Node not showing in plot

I want a node do describe my second function e^{-2t} but it doesn't showing up; this is my code: \begin{tikzpicture} \begin{axis}[ xmin=-3,xmax=3, ymin=-2,...
Dio's user avatar
  • 3
0 votes
1 answer
62 views

How to assign a single figure-number for a group of plots?

I need to assign a single alphabet to a group of plots because I will be creating multiple groups of plots. How can I do this in latex (overleaf)? \documentclass{article} \usepackage{svg} \usepackage{...
skm's user avatar
  • 960
1 vote
1 answer
115 views

How to place nodes on a Tikz plot

I have this curve made with TikZ: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [cyan,line width=1mm] plot [smooth, tension=2] coordinates { (0,0) (5,...
Andros's user avatar
  • 339
0 votes
0 answers
62 views

How to plot the plane x+z=0

How to plot the plane x+z=0. I took four points on x+z=0 plane to form a rectangle. Is this a correct approach? \documentclass[tikz,border=10mm]{standalone} \usepackage{tikz} \usepackage{tikz-...
math131's user avatar
  • 149
1 vote
2 answers
162 views

to plot the plane of intersection of the sphere $x^2+y^2+z^2=1$ and the plane $x+z=0$

I want to plot the plane of intersection of the sphere $x^2+y^2+z^2=1$ and the plane $x+z=0$. See the edit I have tried to plot it with the help of https://tikz.net/parametric-sphere/. My plane of ...
math131's user avatar
  • 149
0 votes
1 answer
46 views

\tikzpicture vs. axis vs. \pgfmathdeclarefunction vs. \tikzmath vs. \tikzset vs. \def\func

we can declare a function in the tikzpicture options, in \axis option, in \pgfmathdeclarefunction, in \tikzmath, by using \tikzset, by using the \def\func, etc... That is confusing as hell (at least, ...
Rubem Pacelli's user avatar
0 votes
1 answer
58 views

Trying to draw a line using pgfplots

I would like a simple plot that shows a line with a negative slope. I do not want to show a specific line. I am using the package pgfplots. Here is what I have: \begin{tikzpicture} \begin{axis}[ axis ...
Bob's user avatar
  • 255
2 votes
0 answers
134 views

Penrose-Carter Diagrams with Tikz

I am trying to draw the Penrose diagram for the motion of a particle in a Schwartzschild background. I was able to draw the diagram thansk to This article by Izaak Neutelings The code is the ...
LolloBoldo's user avatar

1
2 3 4 5
24