Questions tagged [graphs]
Graphs are (1) graphs of functions or (2) sets of nodes and edges.
1,121
questions
0
votes
0
answers
25
views
Plots with gnuplots is now working
I've always used pgfplots to make my graphs, but I needed to do a graph for an implicit function, so I was consulting and I read about Gnuplots. I installed the program and compile my document, but ...
0
votes
1
answer
47
views
TikZ - tikzpicture nested in \graph node
I am trying to nest tikz graph environments into the nodes of a tikz graph environment:
\begin{tikzpicture}
\graph [layered layout]{
ABABAB -> {
AB -> {A, B},
...
2
votes
1
answer
82
views
Drawing a hexagon structure similar to a Grötzsch graph with TikZ
I am trying to draw a hexagon that is connected to a set of vertices and edges within the borders of the hexagon itself. It is similar to a Grötzsch graph but is a hexagon rather than a pentagon.
So ...
0
votes
1
answer
54
views
Drawing a line graph
For an unknown reason the code doesn't compile.
\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel=Month,
ylabel=...
0
votes
0
answers
22
views
How to draw graphs with arrows, points, and curly brackets
I am trying to learn how to use tikz package to draw these two graphs, but I don't know how to start. Could anyone help show how to this kind of graphs? Thanks.
0
votes
1
answer
54
views
How can I draw a curved cut line in a DAG?
Here I have drawed a DAG(s). If possible I want to cut it with a curved lined.
My code:
\documentclass[journal,onecolumn]{IEEEtran}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{decorations....
1
vote
0
answers
75
views
Need Help with LaTeX: Can I Convert This Math Image?
I'm new to LaTeX and am attempting to convert my handwritten Math notes into a digital format. I have this specific graph (attached below) that I want to convert to LaTeX. Is it possible to do this ...
5
votes
1
answer
63
views
Disappearing arrow head in tikz graphs
I am drawing directed acyclic graphs in tikz. They look great, but when i try to specify arrow input coordinates sometimes the arrow head disappears, and I would like to understand why.
my preamble is:...
1
vote
1
answer
44
views
How can I remove these discontinuity lines in pgfplots?
I'm plotting this:
Only problem: the vertical discontinuity lines. I don't know how to remove them. I understand what is happening, I asked pgfplots to draw something for me, and it doesn't ...
2
votes
1
answer
120
views
How can I draw \tikz \graph inside a figure?
I am working on 19 Specifying Graphs section in the pgfmanual. \graph {} collapses with the text. Is is possible to draw without collapsing with the text?
\documentclass{article}
\usepackage{tikz}
\...
8
votes
3
answers
762
views
I want to draw a 3-hyperlink (hyperedge with four nodes) as shown below? I have also included the code for my attempt at that
\documentclass[crop, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{topaths,calc, backgrounds}
\begin{document}
\begin{tikzpicture}
% Define the nodes and their positions
\node[draw,...
4
votes
2
answers
149
views
How to draw the following image using `TikZ` and `tikz-graphs`
There is the need to draw graphs like the following for a specific subject, the intent is to create a template where others can be created easily.
There are some requisites
No need to mind about the ...
4
votes
1
answer
109
views
How to draw very tiny loops in tikz?
I am trying to draw the Brujin Graph D(2,3) in such a way that it no edges cross, but the loops on {0}{11}{22} are causing me problems. Is there a way to make the loops very small using this format? ...
3
votes
1
answer
40
views
Using pgfplots to display a dataset and a function at the same time not working
As the title suggests, I'm trying to display a data set and a function in the same graph - more or less like this excel graph, with the blue dots representing the data, and the orange line being the ...
0
votes
0
answers
22
views
why can't I specify a shade of color or color parameters in the fillcolor parameter of graphviz?
I am trying the following:
\documentclass{standalone}
\usepackage[pdf]{graphviz}
%%% Helper code for Overleaf's build system to
%%% automatically update output drawings when
%%% code in a \digraph{......
2
votes
2
answers
136
views
how to draw double-circle diagram in tiKz?
How can I draw the following diagram in LaTeX? But instead of the black dots in vertices, I want to put the numbers.
1
vote
2
answers
81
views
How to draw a graph with a row of incomplete semi-circles with a few extra edges in TikZ
I want to draw something like the hand-drawn picture I have attached (the second picture). This is actually a portion of the line digraph of Figure 2 (with a specified orientation), which I have also ...
4
votes
2
answers
139
views
How to draw many semi-circles in a row with different centres in Tikz
I am wanting to draw five semi-circles in a row (something like the second photo). This is a graph with the dots as vertices/nodes. I can draw one semi-circle, which is centered at the origin (pleae ...
1
vote
1
answer
59
views
Declaring variables in Tikz
I have a Tikz graph of a step function which I'm trying to draw, and I think most of it is boiler-plate, but the part that I wrote which isn't working as I'd hoped is:
\foreach \i in {0,1,...,5}
\...
0
votes
0
answers
38
views
How do i add a milimetric grid behind my graph
So all i want is a milimetric grid that covers the graph and the axis. I haven't tried anything and don't know where to start from but here is the code for the graph itslef
\begin{center}
\begin{...
3
votes
2
answers
143
views
Automatically placing graph node labels outside the nodes
I am using the TikZ+LuaTeX graph drawing library and enjoying it. I am trying to match a style where vertex labels are drawn outside the vertices. Here is an example:
(From Mathematics, a Discrete ...
5
votes
3
answers
150
views
Drawing partial trees of different sizes side-by-side
There exists an elaborate thread about how to draw rooted trees in LaTeX, e.g. for use in natural language applications. There exist packages other than TikZ to do this, like qtree or forest. However, ...
2
votes
1
answer
84
views
Tikz: Drawing "random" paths in TikZ
I am working on Graph Theory and I have to draw paths that seem quite random such as the ones on the 1st image. I have created the paths P,Q on the 2nd image using the code below.
However, it seems ...
3
votes
1
answer
442
views
Automated Dijkstra Visualization
I want to visualize the Dijkstra algorithm for finding the shortest path. I am inspired by this post. Sadly, I am way too bad at LaTeX. My initial idea was doing it with LuaLaTeX using Lua and I was ...
2
votes
0
answers
77
views
Graph of a log function using TikZ/pgfplots package with a vertical slope is missing data [duplicate]
I have a problem using the TikZ/pgfplots package in LaTeX.
I need to graph a function like this:
$y=-\log_{10} (0.5\cdot (-x+\sqrt{x^2+4 \cdot 10^{-14}})$
And I have been using this code without ...
0
votes
1
answer
95
views
How to draw this graph in LaTeX?
I have a problem drawing this graph in LaTeX, can anyone help me draw this graph? I find it hard to draw the slanted lines, and when I draw them, it was disorder. This is what I've tried:
\begin{...
2
votes
1
answer
53
views
How can I reproduce this graph of theorems?
I saw this really nice summary of all the theorems in a chapter, and there were 5 theorems arranged in a pentagon shape. They had the implication arrows () showing how they related to each other.
How ...
1
vote
1
answer
72
views
Plotting a function with a gamma evaluation
I need your help in graphing some functions within a Latex document. Two or more curves need to be graphed within my report to be placed between two paragraphs. For example,
f1(x) =abs((Gamma(1/x) - ...
2
votes
1
answer
113
views
Tikz: edges overlapping with other edges and nodes on graph
The code below produces a graph that is difficult to interpret because the nodes and edges are overlapping. I referred to another Stackexchange post for a solution but it seems not to work in this ...
0
votes
1
answer
81
views
How can I plot the Core at cooperative game by latex?
Consider a game of a function v which has floowing ways
$V(1)>= 12$
$V(2)>= 7$
$V(3)>= 10$
$V(1,2)>= 128$
$V(1,3)>= 185$
$V(2,3)>= 18$
$V(1,2,3)=300$
How can I plot such a function ...
0
votes
0
answers
19
views
How to plot predictive distribution in linear regression?
I am wondering if I could draw predictive distribution in LaTeX.
Could someone please help me with this?
0
votes
0
answers
140
views
Sigmoid function in LaTeX
I am taking a probability and statistics course and I wanted to draw a logistic regression graph, so I figured I'd use LaTeX for this. This is my first time using it so I am having a bit of trouble. I ...
1
vote
0
answers
32
views
pgfplots line does not show up
I am trying to draw a line of best fit through my data, this is what I am trying to do.
\documentclass{report}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{tabularx}
\...
1
vote
1
answer
75
views
How to label two vertices on a semicircle?
I would like to draw a semicircle with dashed line style and label two vertices on the semicircle. I used the following code, but it's strange that these two vertices don't fall on the semicircle. I ...
0
votes
1
answer
58
views
How can I change the style of the endpoints of a regular dodecagon from round dots to squares?
I want to draw a cycle with 12 vertices, and the circle's style is a regular 12-sided polygon, so I use the following code:
\documentclass[tikz, border=1mm]{standalone}
\usetikzlibrary{shapes....
1
vote
2
answers
118
views
Drawing a Wheel graph of order 6 and 7 (W_6 and W_7)
We are trying to draw a wheel graph of order 6 on overleaf. We're having a hard time drawing it because it's hard to align the two vertices below the hub. We're just a beginner in coding in latex and ...
0
votes
1
answer
89
views
Drawing a varying waveform with labels
I am trying to draw the following graph using tikzpicture. I dont know what would be the function graph for this as all time periods are varying. How can I draw this in latex?
Edit: I am able to draw ...
3
votes
1
answer
84
views
Tikz - shade area among existing edges of graph
I have this graph generated by the code given below.
\begin{tikzpicture}[node distance={25mm}, thick, main/.style = {draw, circle}]
\node[main] (1) {$11$};
\node[main] (2) [right of=1] {$12$};
\node[...
4
votes
3
answers
123
views
Artifacts in edge labels in tikz graph
I have this code which I am compiling with luatex:
\usepackage{tikz}
\usetikzlibrary{graphs, graphdrawing, positioning, quotes}
\usegdlibrary{force}
\begin{tikzpicture}
\graph[spring layout, nodes=...
0
votes
1
answer
98
views
How to caption a graph in LaTeX?
I am using LaTeX for writing a lab report for my Physics class and I have added a graph to my report as a figure using the following lines:
\begin{figure}[H]
\centering
\includegraphics[scale=0.7]{Lab ...
2
votes
1
answer
135
views
Drawing graphs with two y-axis
I am trying the following graph using tikzpicture. The graph is a bit complex with two y-axis and a single x-axis. I dont know how to add co-ordinates to draw the two graphs.
This is the code I have ...
0
votes
0
answers
59
views
How to replicate a normal distribution plot
I was wonder if it is possible to replicate a normal distribution plot as shown. If so, how? Thank you!
4
votes
6
answers
1k
views
Help with Graph Consisting of Lines and Nodes
I am trying to draw the following graph in tikz, but rather embarrasingly, I have only managed to draw part (a).
I tried to read the extensive pgfmanual and was intimidated and bewildered by the ...
-1
votes
1
answer
90
views
How to draw a rook graph?
I'm trying to draw a $4\times 4$ rook graph. That is, the graph whose vertices form a $4\times 4$ grid whose edges indicate the allowed movement of the rook on a chess board.
I'm struggling to draw ...
1
vote
1
answer
45
views
tikz gd drawing library not drawing arrows in edges
I'm using Graph Drawing with Force algorithm to place nodes and edges, but for some reason the edges do not display the arrows when [spring layout] is used.
It works correctly when manually placing ...
2
votes
2
answers
282
views
Not a good result for a graph made with tikz
I made the graph of y = \sqrt{|x|} with TikZ and the result isn't so good close to the beginning of the axes. Below you can see the difference between a photo from GeoGebra and this TeXlive.net ...
0
votes
1
answer
534
views
Drawing a simple graph in overleaf/LaTeX
i am trying to create the following graph in Overleaf:
I have seen many questions on related sites of people asking similar questions with different types of graphs, however i can't find anything on ...
1
vote
1
answer
81
views
Plotting hyperbolic trigonometric function with TikZ
everyone.
I've been trying to plot the modes shapes of a beam according to the following equation:
Where βn*L is 0 for n = 0, 4.7300 for n = 1, 7.8532 for n = 2 and so on.
I should be getting the ...
-1
votes
1
answer
76
views
How to draw a table inside first quadrant? [closed]
I want to draw a table inside first quadrant. For example
0
votes
1
answer
67
views
Creating scatter plots with trendlines on Latex [duplicate]
I have a some scatter plots with corresponding regression lines in MS Excel similar to the one shown below.
I want to have this plot in my Latex document. I could simply insert this as an image, but ...