The 2024 Developer Survey results are live! See the results

Questions tagged [graphs]

Graphs are (1) graphs of functions or (2) sets of nodes and edges.

1,170 questions
Filter by
Sorted by
Tagged with
41 views

Why PDFs are not displayed in my latex

I am using overleaf and I built my latex file. in this project i have a chart that is in a pdf file "method.pdf" I have a porblem that pdfs are not showing, and i only get a box with the ...
• 437
1 vote
36 views

How to slant the edges in the given graph?

I am unable to draw the following graph in tikz. I tried the following code in tikz but it is not producing the desired output. Can someone please help me out. \begin{figure} \centering ...
• 157
1 vote
78 views

Reproducing the lichess opening tree stat bar

Can LaTeX offer something like this or the like shapes with same info?
• 165
1 vote
82 views

Cell diagrams of projective resolutions

A really nice way to visualize resolutions of modules over small algebras is through cell diagrams. These are really useful, for instance, in algebraic topology, when one wants to compute Ext over a ...
27 views

Using TikZ to Plot the Fourier Transform with Magnitude and Argument Coloring

I would like to use TikZ to draw the function graph of the Fourier transform 𝐹(𝜔) of 𝑒^𝑡 sin(𝑡)𝑢(𝑡). The x-axis represents 𝜔, the y-axis represents the magnitude of 𝐹(𝜔), and different ...
• 1
1 vote
42 views

Connecting two trees with a line, with tikz

I have two trees one next to the other. Some of the nodes should be connected. The code for connection nodes is breaking compilation, and I don't get any lines connecting the nodes between the trees. \...
• 25
294 views

LaTeX (on overleaf) keeps cutting off my polynomial plots

Here is the preamble and the code for the graph: \documentclass[12pt]{article} \usepackage{graphicx} % Required for inserting images \usepackage{pgfplots} \usepackage{amsmath} \usepackage{enumerate} \...
• 71
36 views

Latex errors when the number of nodes of a graph is more than 26!

I do not need any counter, I am just trying to draw a graph with 35 nodes. However, it gives the following errors: counter too large! and missing \endcsname inserted! The problem, I guess, is ...
• 21
56 views

TikZ label at wrong path

I want to create an overview of definitions/theorems using a graph. As you can see the "Def" and "Thm 38" labels from (b) to (a) are not on the path. How can I fix this. Any other ...
• 123
66 views

Control positioning of Tikz label of an edge

Here's my code: \usepackage{tikz} \usetikzlibrary{automata, positioning, arrows} \tikzset{ ->, % makes the edges directed >=stealth, % makes the arrow heads bold node distance=3cm, % specifies ...
77 views

Tikzpicture Multi-Edge

I want to create a multigraph. It's correct so far, but I want to have 3 edges from A to the same node B. This is my latex code: \begin{tikzpicture}[level distance=1.5cm, level 1/.style={sibling ...
• 69
1 vote
62 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=...
• 1,539
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={...
251 views

Is it possible to reduce the number of loops?

Below is a graph I drew using TikZ, which achieves the purpose. However, I feel that my code is still not concise enough because it uses four for-loops. Is there a more concise method? \documentclass{...
• 795
483 views

Calling TikZ code (speedometer) several time to plot the same graph multiple time

I wonder if there is a way to encapsulate the following tikz code in a function so that I can repeat that diagram several times on the same page. I wanted to be able to redraw the following chart ...
• 165
124 views

Drawing surfaces with TikZ

As a complete TikZ novice, I want to create surfaces like the following handdrawn one with TikZ: Ideally, this should be coded bottom-up: First you draw the bident with xy-plane at height 0. Then you ...
53 views

Shifting the overlaping pgfplot axis labels

I'm struggling to find a way to make the plot look the same as source image. In it, on the x axis, the "close" (65,67 and 122,124) labels are shifted. I cannot force the pgfplot to do ...
• 123
43 views

Adding direction arrows for a parametric graph

I am trying to add direction arrows along the path of a parametric curve. I have figured out how to make the curve below (Ignore the red parabola): \begin{document} \section{2D Plots} \begin{...
34 views

Can TikZ/Graph do automatic placement taking into account edge label length?

I wish to automatically draw a graph, with labels of diverse lengths on the edges. For it to be pretty, I need that: If a node is automatically placed below another, then the edge label length ...
• 1,444
39 views

Error with color name appearing when coloring a node in TikZ [closed]

I'm trying to draw a directed graph where each vertex and each arrow can be colored individually by a specific color. I have a code that mostly works: \documentclass{article} \usepackage[dvipsnames]{...
• 183
28 views

Idk how to put a open interval on graph on the overleaf

I've been struggling with the graph f(x)=(x^2-4)/(x-2), I know that is equal to f(x)=x+2, but it's undefined when x=2, where there should be an open interval. I am unsure how to place the open ...
1 vote
62 views

Highlight 3D plot minimum point

How can I display this plot in a different point of view, so I can highlight the minimum point? \documentclass[12pt]{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \...
• 1,539
1 vote
24 views

tikz multipartite graph node arrangement

I am very new to tikz (and posting on stackexchange). I am trying to draw a graph with 27 vertices, consisting of 9 independent sets of 3 vertices each. All other edges are included. With the code ...
• 11
61 views

Trouble with plot graphs

I try to compile this example for plotting graphs: https://texample.net/tikz/examples/drawing-graphs/ But, if I compile in TexWorks (pdfLatex or Overleaf) % Drawing a graph using the PG 3.0 ...
• 225
192 views

forest: Even horizontal distribution of all nodes on the same level

In the following tree, some nodes have multiple parents (which technically violates the tree definition). Therefore, to create the tree in the forest package, I manually added the edges from children ...
• 101
77 views

Showing the Traces of a Hyperbolic Paraboloid

I'm having trouble getting the shading/layering for the traces of a hyperbolic paraboloid to look right. I tried breaking up the hyperbolic paraboloid and traces into sections and layered them ...
• 87
1 vote
28 views

includesvg only displays graph axes and not data

I have two similar graphs that I'm trying to display using \includesvg on Overleaf. One renders perfectly, the other renders the axes but none of the data. An example project is linked here. The svg ...
• 111
152 views

I am drawing a cycle in TikZ, need to add integer labels on the outside of each node

Here is what I have so far: \begin{tikzpicture} \tikzstyle{every node}=[draw, circle, fill=black, inner sep=0pt, minimum size=5pt] \tikzstyle{every path}=[line width=.75 pt] \foreach \s in {1,...,5} {...
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 ...
47 views

One of the edge enters into the circle of vertex 1, how to correct

In the code below, one of the edge enters into the circle of vertex 1. How to modify this code. \documentclass[tikz,margin=5pt]{standalone} \begin{document} \begin{tikzpicture} \foreach \n [count=\i]...
• 149
81 views

Chemfig and TikZ

How can I make a chemical graph, with empty boxes, like this: In chemfig + TikZ? Or there is some other way? Somebody try something like this before?
41 views

Which software can be used for diagrams incorporated in latex and html

I need to draw one or a few flow-diagram like graph which must be included in a PDF produced with Latex and a HTML file shown in a browser. What is the best option for the software? I would prefer a ...
• 1,120
1 vote
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{...
50 views

Error when trying to add Pgfplots to figure environment

I am relatively new to LaTeX, but I have been attempting to write my Master's thesis using it. I have been creating several plots using the pgfplots package. However, when I attempt to insert these ...
79 views

How to type in such a diagram that is shown in the picture of an isotherm? [closed]

How can I recreate such a diagram? with the line segments and not necessarily with the points (V_2, P_5, T_5), ..., etc.
53 views

How to draw the depicted contour in tikz? [closed]

How may I draw the following image as a tikzpicture?
• 179
40 views

Numbering nodes based on calculation in a for loop

This may be one duplicate of this QA. But I failed to use its answer. Here is my example code: \documentclass{article} \usepackage{tikz} \usepackage{fp} \newcommand*{\xMin}{0}% \newcommand*{\xMax}{4}%...
• 163
1 vote
76 views

How to draw a self loop and parallel edges with tkz-graph

How to draw a self loop at v_3 and parallel edge between v_4 and v_3 with \usepackage{tkz-graph} (If tkz-graph is not the best for plotting graphs, please mention the best way for plotting graphs) ...
• 1,101
51 views

PGFPlots show full decimal numbers on nodes and ticks

I have following graph and i need written out decimal numbers on the y ticks axis aswell as ontop of the bars. I found some other questions here that said to use y tick label style={/pgf/number ...
• 103
38 views

Help with bar chart

I need to make a graph similar to the photo. I have the beginning of the code in LATEX, but it does not work correctly, you also need to add inscriptions like in the photo, you can write in your own ...
• 31
107 views

Help with graph

) I tried to do it, but it didn't work. You need to repeat the drawing on the picture, also add text (you can your own, I will edit). My code: \documentclass[tikz,border=10pt]{standalone} \usepackage{...
• 31
81 views

Help to complete the graph in Latex using tikz

I would like to ask for help in building a graph, I really need your help My code: \documentclass[tikz,border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{angles,quotes} \begin{document} \...
• 31
1 vote
136 views

Coloring pst-3dplot Surfaces

I have drawn traces of the hyperbolic paraboloid z=y^2-x^2 using pst-3dplot as shown below: I want to put color on this quadric surface to make it look more realistic. Is there a way to do this? (...
87 views

Truncating a pst-3dplot Surface

The graph of a function and the MWE are given below: \documentclass{article} \usepackage{pst-3dplot} \begin{document} \begin{pspicture}(-3.2,-2.73)(3.18,3.65) \psplotThreeD[ plotstyle = line, ...
273 views

I want to have exactly 12.5 mm between my figures/tikz figures. How do I do this?

For a project I am supposed to draw different graphs with edges and vertices. One of the points of the project is that the distance between the graphs should exactly be 12.5 mm, but I can't find a way ...
1 vote
173 views

Graphing a Hyperbolic Paraboloid in PSTricks

I saw the graph of the following hyperbolic paraboloid here. I believe this one is done via PSTricks. I can only do the axes as seen in the MWE below. \documentclass[10pt,a4paper]{report} \usepackage{...
1 vote
54 views

Axes in pst-3dplot and pst-solides3d

This is just a simple question regarding the comparison of the axes using pst-3dplot and pst-solides3d packages. The MWE and the output are as follows: \documentclass[pstricks,border=12pt,12pt]{...
1 vote
179 views

Difficult Spiro Para-Hexagonal Ring?

How can I draw the following diagram in LaTeX? this is code but it is different, \begin{center} \begin{tikzpicture}[scale=0.4,cap=round,>=latex] \draw[thick,blue] (0,0) -- (2,1.5) (2,1.5) -- (...
• 31
1 vote