New answers tagged graphs
1
vote
Plot graph with labels
Using tzplot:
\documentclass{standalone}
\usepackage{tzplot}
\begin{document}
\begin{tikzpicture}[x=.1cm,y=.01cm,font=\scriptsize,label distance=-5pt]
\tzhelplines[xstep=5,ystep=50,solid,gray!25](...
0
votes
Accepted
TikZ Causal Graph Details (bold, arrow positions, text above paths)
Let's see:
to have multiline nodes, you have to specify an align key; to have automatic line breaks, you need a text width
to change the font of the node you can use the key font
to add text around ...
1
vote
TikZ Causal Graph Details (bold, arrow positions, text above paths)
As commutative diagram:
\documentclass[border?3.141592]{article}
\usepackage{amsmath}
\usepackage{makecell}
\usepackage{tikz-cd}
\tikzcdset{
arrow style = tikz,
arrows = {>=Straight Barb, ...
7
votes
Accepted
Draw boxes around nodes in tikz
Use fit library and also don't forget to use rotate fit command to allow the non horizontal fitting. I also changed a bit your main nodes description to let you have all nodes the same size.
\...
5
votes
Accepted
How to draw "ring-like" graphs?
Each arc is obtained through the path attribute perp circle that is defined at the beginning; it draws a circle perpendicular to a reference circle (the black one in the first drawing) and it depends ...
2
votes
How to draw "ring-like" graphs?
Unless your graph is a well known graph or has just a few edges there isn't an easy way to produce many graphs quickly because the specific edges have to be included one by one. For 20 vertices I can ...
3
votes
Accepted
Plot graph with labels
This is a long comment with my suggestion of using Asymptote (can be imbbed into LaTeX).
For the first figure, there is a lack of information of the function P(t). What is the analytic formula of it? ...
2
votes
Accepted
TikZ graph with nodes crossed out
You can define macros to draw the crosses in the nodes. For example,
\newcommand{\snode}[1]{\draw(#1.45)--(#1.225);}
Then if you have a circular node (node1), you can call \snode{node1} inside a ...
2
votes
Accepted
tikz graph with boxes
Try this code:
\documentclass{beamer}
%layout
\mode<presentation>{
\usetheme{Madrid}
}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{frame}
\frametitle{Diagramm}
\begin{...
1
vote
Accepted
How to make edges parallel
One quick workaround is to change the following lines
\draw (Q2) edge [auto rotate, above] node [pos = 0.5] {$b$} (Q4);
\draw (Q4) edge [auto rotate, below] node [pos = 0.5] {$a$} (Q2);
to
\draw (Q2) ...
1
vote
Reposition graph edges
Based on my answer on the your previous question:
\documentclass[tikz,12pt,border=1mm]{standalone}
\usetikzlibrary{arrows.meta, automata,
positioning,
quotes,
...
2
votes
Accepted
How to make this type of graphs used to talk about regular rooted trees?
For the first figure, I suggest using forest. Use name= to name the nodes. Then you can use ordinary tikz commands at the end.
\documentclass{article}
\usepackage{forest}
\usetikzlibrary{decorations....
1
vote
Reposition graph edges
Your code is overly complicated. Just \draw from (V) to (V) and set in= and out= angles, together with looseness.
\draw (V)to[out=250, in=290, looseness=3]node[below] {$a,b,c$}(V);
\draw (Q2)to[out=...
1
vote
Accepted
Reposition graph edges
As commented by @frougon. This is a way to do it:
\documentclass[tikz,12pt,border=1mm]{standalone}
\usetikzlibrary{automata}
\usepackage{amssymb}
\begin{document}
\begin{tikzpicture}[
->, >=...
7
votes
Accepted
How to do graph in LaTeX
Change the value 2 in \resizebox{2\textwidth}{!}{...} to automatically resize the diagram.
\documentclass[border=3.14mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{automata, arrows.meta, ...
1
vote
Change vertex and edge style
A variation of the first version of @frougon's answer. By defining state style as ellipse the MWE become more concise and clear:
\documentclass[tikz,12pt,border=1mm]{standalone}
\usetikzlibrary{arrows....
3
votes
How to make this type of graphs used to talk about regular rooted trees?
Follow the suggestions of Alan Munn for the first graph.
For the others graphs try this code:
\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=...
1
vote
Accepted
Change vertex and edge style
Edit: thanks to Zarko's answer (+1), I realized that I had not tried the obvious ellipse style (or shape=ellipse) correctly: I had only tried \node[ellipse, state, ... which doesn't give the expected ...
0
votes
Accepted
How can I make this figure fit on the page, without going over the margin?
Solution #1: Decrease the margins
Suggested replacement of Line 2:
\usepackage[left=1cm, right=1cm]{geometry}
This shrinks the margins of the page on the left and right, making more space for your ...
Top 50 recent answers are included
Related Tags
graphs × 1029tikz-pgf × 598
pgfplots × 125
diagrams × 101
graphics × 95
plot × 46
nodes × 41
tikz-graphs × 37
tikz-trees × 35
tikz-styles × 32
tikz-arrows × 31
tikz-graphdrawing × 22
labels × 20
edge × 20
pstricks × 15
trees × 14
tkz-graph × 14
math-mode × 12
color × 12
arrows × 12
charts × 12
positioning × 11
automata × 11
beamer × 10
xy-pic × 10